]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/hid/i2c-hid/i2c-hid.c
Merge branches 'for-3.12/devm', 'for-3.12/i2c-hid', 'for-3.12/i2c-hid-dt', 'for-3...
[karo-tx-linux.git] / drivers / hid / i2c-hid / i2c-hid.c
index fc9d92cb3f3951d37224ef3d03e8e0f1987a93cf..c1336193b04ba3deb92c3edf2468551f3f6933a9 100644 (file)
@@ -757,29 +757,6 @@ static int i2c_hid_power(struct hid_device *hid, int lvl)
        return ret;
 }
 
-static int i2c_hid_hidinput_input_event(struct input_dev *dev,
-               unsigned int type, unsigned int code, int value)
-{
-       struct hid_device *hid = input_get_drvdata(dev);
-       struct hid_field *field;
-       int offset;
-
-       if (type == EV_FF)
-               return input_ff_event(dev, type, code, value);
-
-       if (type != EV_LED)
-               return -1;
-
-       offset = hidinput_find_field(hid, type, code, &field);
-
-       if (offset == -1) {
-               hid_warn(dev, "event field not found\n");
-               return -1;
-       }
-
-       return hid_set_field(field, offset, value);
-}
-
 static struct hid_ll_driver i2c_hid_ll_driver = {
        .parse = i2c_hid_parse,
        .start = i2c_hid_start,
@@ -788,7 +765,6 @@ static struct hid_ll_driver i2c_hid_ll_driver = {
        .close = i2c_hid_close,
        .power = i2c_hid_power,
        .request = i2c_hid_request,
-       .hidinput_input_event = i2c_hid_hidinput_input_event,
 };
 
 static int i2c_hid_init_irq(struct i2c_client *client)
@@ -825,8 +801,8 @@ static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
         * bytes 2-3 -> bcdVersion (has to be 1.00) */
        ret = i2c_hid_command(client, &hid_descr_cmd, ihid->hdesc_buffer, 4);
 
-       i2c_hid_dbg(ihid, "%s, ihid->hdesc_buffer: %*ph\n",
-                       __func__, 4, ihid->hdesc_buffer);
+       i2c_hid_dbg(ihid, "%s, ihid->hdesc_buffer: %4ph\n", __func__,
+                       ihid->hdesc_buffer);
 
        if (ret) {
                dev_err(&client->dev,
@@ -898,8 +874,9 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
        params[1].integer.value = 1;
        params[2].type = ACPI_TYPE_INTEGER;
        params[2].integer.value = 1; /* HID function */
-       params[3].type = ACPI_TYPE_INTEGER;
-       params[3].integer.value = 0;
+       params[3].type = ACPI_TYPE_PACKAGE;
+       params[3].package.count = 0;
+       params[3].package.elements = NULL;
 
        if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DSM", &input, &buf))) {
                dev_err(&client->dev, "device _DSM execution failed\n");