Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264733
b: refs/heads/master
c: 844580f
h: refs/heads/master
i:
  264731: df1908c
v: v3
  • Loading branch information
Nestor Lopez Casado authored and Jiri Kosina committed Sep 20, 2011
1 parent de4fd24 commit a6f3009
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 534a7b8e10ec55d9f521e68c20dbb3634c25b98a
refs/heads/master: 844580ff63ef4eb19eec4cfd8cd6e0b62d81279f
5 changes: 1 addition & 4 deletions trunk/drivers/hid/hid-logitech-dj.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ static const u8 hid_reportid_size_map[NUMBER_OF_HID_REPORTS] = {

#define LOGITECH_DJ_INTERFACE_NUMBER 0x02

#define DJ_DEVICE_INDEX_MIN 1
#define DJ_DEVICE_INDEX_MAX 6

static struct hid_ll_driver logi_dj_ll_driver;

static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
Expand Down Expand Up @@ -823,7 +820,7 @@ static void logi_dj_remove(struct hid_device *hdev)
* have finished and no more raw_event callbacks should arrive after
* the remove callback was triggered so no locks are put around the
* code below */
for (i = 0; i < DJ_MAX_PAIRED_DEVICES; i++) {
for (i = 0; i < (DJ_MAX_PAIRED_DEVICES + DJ_DEVICE_INDEX_MIN); i++) {
dj_dev = djrcv_dev->paired_dj_devices[i];
if (dj_dev != NULL) {
hid_destroy_device(dj_dev->hdev);
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/hid/hid-logitech-dj.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

#define DJ_MAX_PAIRED_DEVICES 6
#define DJ_MAX_NUMBER_NOTIFICATIONS 8
#define DJ_DEVICE_INDEX_MIN 1
#define DJ_DEVICE_INDEX_MAX 6

#define DJREPORT_SHORT_LENGTH 15
#define DJREPORT_LONG_LENGTH 32
Expand Down Expand Up @@ -94,7 +96,8 @@ struct dj_report {

struct dj_receiver_dev {
struct hid_device *hdev;
struct dj_device *paired_dj_devices[DJ_MAX_PAIRED_DEVICES];
struct dj_device *paired_dj_devices[DJ_MAX_PAIRED_DEVICES +
DJ_DEVICE_INDEX_MIN];
struct work_struct work;
struct kfifo notif_fifo;
spinlock_t lock;
Expand Down

0 comments on commit a6f3009

Please sign in to comment.