Skip to content

Commit

Permalink
HID: wacom: Unregister sysfs attributes on remove
Browse files Browse the repository at this point in the history
HID devices can be hotplugged so we should unregister all sysfs attributes when
removing a driver. Otherwise, manually unloading the wacom-driver will not
remove the sysfs attributes. Only when the device is disconnected, they are
removed, eventually.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
David Herrmann authored and Jiri Kosina committed Sep 7, 2011
1 parent dde58cf commit 9086617
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/hid-wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ static void wacom_remove(struct hid_device *hdev)
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
struct wacom_data *wdata = hid_get_drvdata(hdev);
#endif
device_remove_file(&hdev->dev, &dev_attr_speed);
hid_hw_stop(hdev);

#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
Expand Down

0 comments on commit 9086617

Please sign in to comment.