diff options
Diffstat (limited to 'drivers/usb/input/pid.c')
-rw-r--r-- | drivers/usb/input/pid.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c index acc71ec560e9..19e015d171aa 100644 --- a/drivers/usb/input/pid.c +++ b/drivers/usb/input/pid.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #include "hid.h" | 37 | #include "hid.h" |
38 | #include "pid.h" | 38 | #include "pid.h" |
39 | 39 | ||
40 | #define DEBUG | ||
41 | |||
42 | #define CHECK_OWNERSHIP(i, hid_pid) \ | 40 | #define CHECK_OWNERSHIP(i, hid_pid) \ |
43 | ((i) < FF_EFFECTS_MAX && i >= 0 && \ | 41 | ((i) < FF_EFFECTS_MAX && i >= 0 && \ |
44 | test_bit(FF_PID_FLAGS_USED, &hid_pid->effects[(i)].flags) && \ | 42 | test_bit(FF_PID_FLAGS_USED, &hid_pid->effects[(i)].flags) && \ |
@@ -198,7 +196,7 @@ static int hid_pid_upload_effect(struct input_dev *dev, | |||
198 | } | 196 | } |
199 | 197 | ||
200 | effect->id = id; | 198 | effect->id = id; |
201 | dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d\n.", id); | 199 | dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d.\n", id); |
202 | pid_private->effects[id].owner = current->pid; | 200 | pid_private->effects[id].owner = current->pid; |
203 | pid_private->effects[id].flags = (1 << FF_PID_FLAGS_USED); | 201 | pid_private->effects[id].flags = (1 << FF_PID_FLAGS_USED); |
204 | spin_unlock_irqrestore(&pid_private->lock, flags); | 202 | spin_unlock_irqrestore(&pid_private->lock, flags); |
@@ -262,6 +260,7 @@ int hid_pid_init(struct hid_device *hid) | |||
262 | { | 260 | { |
263 | struct hid_ff_pid *private; | 261 | struct hid_ff_pid *private; |
264 | struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list); | 262 | struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list); |
263 | struct input_dev *input_dev = hidinput->input; | ||
265 | 264 | ||
266 | private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL); | 265 | private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL); |
267 | if (!private) | 266 | if (!private) |
@@ -281,11 +280,12 @@ int hid_pid_init(struct hid_device *hid) | |||
281 | usb_fill_control_urb(private->urbffout, hid->dev, 0, | 280 | usb_fill_control_urb(private->urbffout, hid->dev, 0, |
282 | (void *)&private->ffcr, private->ctrl_buffer, 8, | 281 | (void *)&private->ffcr, private->ctrl_buffer, 8, |
283 | hid_pid_ctrl_out, hid); | 282 | hid_pid_ctrl_out, hid); |
284 | hidinput->input.upload_effect = hid_pid_upload_effect; | 283 | |
285 | hidinput->input.flush = hid_pid_flush; | 284 | input_dev->upload_effect = hid_pid_upload_effect; |
286 | hidinput->input.ff_effects_max = 8; // A random default | 285 | input_dev->flush = hid_pid_flush; |
287 | set_bit(EV_FF, hidinput->input.evbit); | 286 | input_dev->ff_effects_max = 8; // A random default |
288 | set_bit(EV_FF_STATUS, hidinput->input.evbit); | 287 | set_bit(EV_FF, input_dev->evbit); |
288 | set_bit(EV_FF_STATUS, input_dev->evbit); | ||
289 | 289 | ||
290 | spin_lock_init(&private->lock); | 290 | spin_lock_init(&private->lock); |
291 | 291 | ||