]> git.baikalelectronics.ru Git - kernel.git/commit
HID: elo: update the reference count of the usb device structure
authorSalah Triki <salah.triki@gmail.com>
Thu, 29 Jul 2021 00:45:12 +0000 (01:45 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 20 Aug 2021 12:22:28 +0000 (14:22 +0200)
commitd9075cbee787f09ed8dc985ab702cb0f915ff915
tree118a2dc7798df202c3cdcbf20d038f19e509daca
parent6679610760fea55b5617c2a3c41b8fd72ebd6415
HID: elo: update the reference count of the usb device structure

Use usb_get_dev() to increment the reference count of the usb device
structure in order to avoid releasing the structure while it is still in
use. And use usb_put_dev() to decrement the reference count and thus,
when it will be equal to 0 the structure will be released.

Signed-off-by: Salah Triki <salah.triki@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-elo.c