Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297464

[PATCH 4/4] HID: usbhid: use to_usb_device

From Geliang Tang <geliangtang@163.com>
Newsgroups linux.kernel
Subject [PATCH 4/4] HID: usbhid: use to_usb_device
Date 2015-12-23 14:30 +0100
Message-ID <qIREl-1LV-9@gated-at.bofh.it> (permalink)
References <qIREl-1LV-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Use to_usb_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/hid/usbhid/usbhid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h
index 807922b..fa47d66 100644
--- a/drivers/hid/usbhid/usbhid.h
+++ b/drivers/hid/usbhid/usbhid.h
@@ -96,7 +96,7 @@ struct usbhid_device {
 };
 
 #define	hid_to_usb_dev(hid_dev) \
-	container_of(hid_dev->dev.parent->parent, struct usb_device, dev)
+	to_usb_device(hid_dev->dev.parent->parent)
 
 #endif
 
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] USB: core, devio: use to_usb_device Geliang Tang <geliangtang@163.com> - 2015-12-23 14:30 +0100
  [PATCH 4/4] HID: usbhid: use to_usb_device Geliang Tang <geliangtang@163.com> - 2015-12-23 14:30 +0100
    Re: [PATCH 4/4] HID: usbhid: use to_usb_device Jiri Kosina <jikos@kernel.org> - 2015-12-28 13:20 +0100
  [PATCH 2/4] USB: core, wusbcore: use bus_to_hcd Geliang Tang <geliangtang@163.com> - 2015-12-23 14:30 +0100
  [PATCH 3/4] USB: host: use to_platform_device Geliang Tang <geliangtang@163.com> - 2015-12-23 14:40 +0100

csiph-web