]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-sony.c: Use devm_ api to simplify sony_battery_probe()
authorHanno Zulla <abos@hanno.de>
Thu, 14 Jun 2018 14:31:36 +0000 (16:31 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 9 Jul 2018 13:14:07 +0000 (15:14 +0200)
commita07be3324773b3a571cd869ef23365d7176772d9
tree4a8c4bb2ca57522d8a349885e43af6614dfe51d9
parentfc30a1053e2fa698440f861174d747abc01c4be6
HID: hid-sony.c: Use devm_ api to simplify sony_battery_probe()

HID: hid-sony.c: Use devm_ api to simplify sony_battery_probe()

Using devm_ calls, the resources of the Sony game devices's features are
tied to the main device handle, making it easier to handle errors and
teardown inside the device driver. Altogether, this reduces complexity
of the driver source.

Signed-off-by: Hanno Zulla <kontakt@hanno.de>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c