diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-03-09 04:58:13 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-09 05:01:06 -0500 |
commit | 83a44ac8bf4a8e6cbbf0c00ff281a482778f708a (patch) | |
tree | 325be1e4d52372db888396549908f25c5370caee /drivers/hid | |
parent | 4ba25d3f87fe3ed6634f61da2a6904e2dfd09192 (diff) | |
parent | d381f45c890a3fb136afb0dc1cbe025e066cb981 (diff) |
HID: Merge branch 'master' into for-3.10/hid-driver-transport-cleanups
Sync with Linus' tree. This is necessary to resolve build conflict
caused by dcd9006b1b053c7b ("HID: logitech-dj: do not directly call
hid_output_raw_report() during probe") which issues direct call to
usbhid_submit_report(), but that is gone in this branch and
hid_hw_request() has to be used instead.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 3 | ||||
-rw-r--r-- | drivers/hid/hid-logitech-dj.c | 22 | ||||
-rw-r--r-- | drivers/hid/hid-roccat.c | 2 | ||||
-rw-r--r-- | drivers/hid/hidraw.c | 6 |
5 files changed, 22 insertions, 12 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index fea20c650f3f..b76eb9eb6ff1 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -2076,6 +2076,7 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
2076 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) }, | 2076 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) }, |
2077 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) }, | 2077 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) }, |
2078 | { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) }, | 2078 | { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) }, |
2079 | { HID_USB_DEVICE(USB_VENDOR_ID_MASTERKIT, USB_DEVICE_ID_MASTERKIT_MA901RADIO) }, | ||
2079 | { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) }, | 2080 | { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) }, |
2080 | { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) }, | 2081 | { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) }, |
2081 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) }, | 2082 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 6e5c2ffa8d96..92e47e5c9564 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -557,6 +557,9 @@ | |||
557 | #define USB_VENDOR_ID_MADCATZ 0x0738 | 557 | #define USB_VENDOR_ID_MADCATZ 0x0738 |
558 | #define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540 | 558 | #define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540 |
559 | 559 | ||
560 | #define USB_VENDOR_ID_MASTERKIT 0x16c0 | ||
561 | #define USB_DEVICE_ID_MASTERKIT_MA901RADIO 0x05df | ||
562 | |||
560 | #define USB_VENDOR_ID_MCC 0x09db | 563 | #define USB_VENDOR_ID_MCC 0x09db |
561 | #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 | 564 | #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 |
562 | #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a | 565 | #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a |
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 3cf62be2ca5d..d9043434ddb3 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c | |||
@@ -458,19 +458,25 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, | |||
458 | struct dj_report *dj_report) | 458 | struct dj_report *dj_report) |
459 | { | 459 | { |
460 | struct hid_device *hdev = djrcv_dev->hdev; | 460 | struct hid_device *hdev = djrcv_dev->hdev; |
461 | int sent_bytes; | 461 | struct hid_report *report; |
462 | struct hid_report_enum *output_report_enum; | ||
463 | u8 *data = (u8 *)(&dj_report->device_index); | ||
464 | int i; | ||
462 | 465 | ||
463 | if (!hdev->hid_output_raw_report) { | 466 | output_report_enum = &hdev->report_enum[HID_OUTPUT_REPORT]; |
464 | dev_err(&hdev->dev, "%s:" | 467 | report = output_report_enum->report_id_hash[REPORT_ID_DJ_SHORT]; |
465 | "hid_output_raw_report is null\n", __func__); | 468 | |
469 | if (!report) { | ||
470 | dev_err(&hdev->dev, "%s: unable to find dj report\n", __func__); | ||
466 | return -ENODEV; | 471 | return -ENODEV; |
467 | } | 472 | } |
468 | 473 | ||
469 | sent_bytes = hdev->hid_output_raw_report(hdev, (u8 *) dj_report, | 474 | for (i = 0; i < report->field[0]->report_count; i++) |
470 | sizeof(struct dj_report), | 475 | report->field[0]->value[i] = data[i]; |
471 | HID_OUTPUT_REPORT); | 476 | |
477 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); | ||
472 | 478 | ||
473 | return (sent_bytes < 0) ? sent_bytes : 0; | 479 | return 0; |
474 | } | 480 | } |
475 | 481 | ||
476 | static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) | 482 | static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) |
diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index b685b04dbf9d..d7437ef5c695 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c | |||
@@ -378,7 +378,7 @@ EXPORT_SYMBOL_GPL(roccat_disconnect); | |||
378 | 378 | ||
379 | static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 379 | static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
380 | { | 380 | { |
381 | struct inode *inode = file->f_path.dentry->d_inode; | 381 | struct inode *inode = file_inode(file); |
382 | struct roccat_device *device; | 382 | struct roccat_device *device; |
383 | unsigned int minor = iminor(inode); | 383 | unsigned int minor = iminor(inode); |
384 | long retval = 0; | 384 | long retval = 0; |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index f3bbbce8353b..a7451632ceb4 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -108,7 +108,7 @@ out: | |||
108 | * This function is to be called with the minors_lock mutex held */ | 108 | * This function is to be called with the minors_lock mutex held */ |
109 | static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type) | 109 | static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type) |
110 | { | 110 | { |
111 | unsigned int minor = iminor(file->f_path.dentry->d_inode); | 111 | unsigned int minor = iminor(file_inode(file)); |
112 | struct hid_device *dev; | 112 | struct hid_device *dev; |
113 | __u8 *buf; | 113 | __u8 *buf; |
114 | int ret = 0; | 114 | int ret = 0; |
@@ -176,7 +176,7 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t | |||
176 | * mutex held. */ | 176 | * mutex held. */ |
177 | static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type) | 177 | static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type) |
178 | { | 178 | { |
179 | unsigned int minor = iminor(file->f_path.dentry->d_inode); | 179 | unsigned int minor = iminor(file_inode(file)); |
180 | struct hid_device *dev; | 180 | struct hid_device *dev; |
181 | __u8 *buf; | 181 | __u8 *buf; |
182 | int ret = 0, len; | 182 | int ret = 0, len; |
@@ -340,7 +340,7 @@ unlock: | |||
340 | static long hidraw_ioctl(struct file *file, unsigned int cmd, | 340 | static long hidraw_ioctl(struct file *file, unsigned int cmd, |
341 | unsigned long arg) | 341 | unsigned long arg) |
342 | { | 342 | { |
343 | struct inode *inode = file->f_path.dentry->d_inode; | 343 | struct inode *inode = file_inode(file); |
344 | unsigned int minor = iminor(inode); | 344 | unsigned int minor = iminor(inode); |
345 | long ret = 0; | 345 | long ret = 0; |
346 | struct hidraw *dev; | 346 | struct hidraw *dev; |