From 8f86a2c3cb90e8bb0733de2d2b0abbe7050bb536 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Sun, 3 Jul 2011 13:39:48 -0400 Subject: hid: Add module.h to fix up implicit users of it A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in clocksource are actually calling out for explicitly in advance. Signed-off-by: Paul Gortmaker --- drivers/hid/hid-roccat-common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/hid/hid-roccat-common.c') diff --git a/drivers/hid/hid-roccat-common.c b/drivers/hid/hid-roccat-common.c index edf898dee28b..b07e7f96a358 100644 --- a/drivers/hid/hid-roccat-common.c +++ b/drivers/hid/hid-roccat-common.c @@ -13,6 +13,7 @@ #include #include +#include #include "hid-roccat-common.h" static inline uint16_t roccat_common_feature_report(uint8_t report_id) -- cgit From 4c33a885a5c8a9ad573249fa4ee4fb39af866599 Mon Sep 17 00:00:00 2001 From: Thomas Meyer Date: Thu, 17 Nov 2011 23:43:40 +0100 Subject: HID: roccat: Use kmemdup rather than duplicating its implementation Signed-off-by: Thomas Meyer Signed-off-by: Jiri Kosina --- drivers/hid/hid-roccat-common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/hid/hid-roccat-common.c') diff --git a/drivers/hid/hid-roccat-common.c b/drivers/hid/hid-roccat-common.c index edf898dee28b..f933221ba525 100644 --- a/drivers/hid/hid-roccat-common.c +++ b/drivers/hid/hid-roccat-common.c @@ -48,12 +48,10 @@ int roccat_common_send(struct usb_device *usb_dev, uint report_id, char *buf; int len; - buf = kmalloc(size, GFP_KERNEL); + buf = kmemdup(data, size, GFP_KERNEL); if (buf == NULL) return -ENOMEM; - memcpy(buf, data, size); - len = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), HID_REQ_SET_REPORT, USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_OUT, -- cgit