projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1f5409
)
HID: wacom: use devres to allocate driver data
author
Benjamin Tissoires
<
[email protected]
>
Wed, 13 Jul 2016 16:05:58 +0000
(18:05 +0200)
committer
Jiri Kosina
<
[email protected]
>
Fri, 5 Aug 2016 11:39:15 +0000
(13:39 +0200)
We started switching the driver to devres, so we should use it as much
as possible.
Signed-off-by: Benjamin Tissoires <
[email protected]
>
Acked-by: Ping Cheng <
[email protected]
>
Signed-off-by: Jiri Kosina <
[email protected]
>
drivers/hid/wacom_sys.c
patch
|
blob
|
history
diff --git
a/drivers/hid/wacom_sys.c
b/drivers/hid/wacom_sys.c
index ec088c1a4868d03147d48214341fc1170c605a40..56d62e8a400b9ec3bdee8eed75ab8dbaaefb4a3c 100644
(file)
--- a/
drivers/hid/wacom_sys.c
+++ b/
drivers/hid/wacom_sys.c
@@
-1844,7
+1844,7
@@
static int wacom_probe(struct hid_device *hdev,
/* hid-core sets this quirk for the boot interface */
hdev->quirks &= ~HID_QUIRK_NOGET;
- wacom =
kzalloc(
sizeof(struct wacom), GFP_KERNEL);
+ wacom =
devm_kzalloc(&hdev->dev,
sizeof(struct wacom), GFP_KERNEL);
if (!wacom)
return -ENOMEM;
@@
-1892,7
+1892,6
@@
static int wacom_probe(struct hid_device *hdev,
fail_type:
fail_parse:
- kfree(wacom);
hid_set_drvdata(hdev, NULL);
return error;
}
@@
-1916,7
+1915,6
@@
static void wacom_remove(struct hid_device *hdev)
wacom_remove_shared_data(wacom);
hid_set_drvdata(hdev, NULL);
- kfree(wacom);
}
#ifdef CONFIG_PM