diff options
author | Kenneth Kwak <kkwak@nvidia.com> | 2014-06-24 21:29:51 -0700 |
---|---|---|
committer | Peter Kim <pekim@nvidia.com> | 2014-06-25 19:12:33 -0700 |
commit | 34022539b84a29896bcde69f10d1a4143d2772c8 (patch) | |
tree | eb765a28cbbb356f683511f37887692344ad56db | |
parent | 528fd218ed1e12ed2b885e6f2825ae2626d0b352 (diff) |
Revert "HID: add remove function in nv hidraw"
DO NOT INTEGRATE
Bug 1466757
This reverts commit 7ccccf232f78411846dfd617121f12d212c57c81.
Change-Id: I826a7cb256b05f5495191119bd05e3ce9a71423a
Signed-off-by: Kenneth Kwak <kkwak@nvidia.com>
Reviewed-on: http://git-master/r/428068
Reviewed-by: Peter Kim <pekim@nvidia.com>
Tested-by: Peter Kim <pekim@nvidia.com>
-rw-r--r-- | drivers/hid/hid-nvidia-blake.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/drivers/hid/hid-nvidia-blake.c b/drivers/hid/hid-nvidia-blake.c index 2d75fa21e2ec..6d64af86fda4 100644 --- a/drivers/hid/hid-nvidia-blake.c +++ b/drivers/hid/hid-nvidia-blake.c @@ -355,16 +355,12 @@ static int nvidia_probe(struct hid_device *hdev, const struct hid_device_id *id) loc->mode = MOUSE_MODE; hid_set_drvdata(hdev, loc); - /* Parse the HID report now */ - ret = hid_parse(hdev); - if (ret) { - hid_err(hdev, "parse failed\n"); - goto err_parse; - } + ret = hid_open_report(hdev); + if (!ret) + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); - ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); if (ret) - goto err_parse; + goto end; ret = device_create_file(&hdev->dev, &dev_attr_speed); if (ret) @@ -372,27 +368,11 @@ static int nvidia_probe(struct hid_device *hdev, const struct hid_device_id *id) ret = device_create_file(&hdev->dev, &dev_attr_mode); if (ret) hid_warn(hdev, "cannot create sysfs for mode\n"); - return 0; -err_parse: - kfree(loc); +end: return ret; } -static void nvidia_remove(struct hid_device *hdev) -{ - struct nvidia_tp_loc *loc = hid_get_drvdata(hdev); - - if (!loc) - return; - - device_remove_file(&hdev->dev, &dev_attr_speed); - device_remove_file(&hdev->dev, &dev_attr_mode); - - hid_hw_stop(hdev); - kfree(loc); -} - static int nvidia_input_mapped(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) @@ -442,7 +422,6 @@ static struct hid_driver nvidia_driver = { .raw_event = nvidia_raw_event, .event = nvidia_event, .probe = nvidia_probe, - .remove = nvidia_remove, }; static int __init hid_nvidia_blake_init(void) |