projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ucc_geth: migrate ucc_geth to phylib
[powerpc.git]
/
drivers
/
usb
/
input
/
hid-lgff.c
diff --git
a/drivers/usb/input/hid-lgff.c
b/drivers/usb/input/hid-lgff.c
index
e474662
..
e6f3af3
100644
(file)
--- a/
drivers/usb/input/hid-lgff.c
+++ b/
drivers/usb/input/hid-lgff.c
@@
-32,7
+32,7
@@
#include <linux/hid.h>
#include "usbhid.h"
#include <linux/hid.h>
#include "usbhid.h"
-struct dev
ice
_type {
+struct dev_type {
u16 idVendor;
u16 idProduct;
const signed short *ff;
u16 idVendor;
u16 idProduct;
const signed short *ff;
@@
-48,11
+48,13
@@
static const signed short ff_joystick[] = {
-1
};
-1
};
-static const struct dev
ice
_type devices[] = {
+static const struct dev_type devices[] = {
{ 0x046d, 0xc211, ff_rumble },
{ 0x046d, 0xc219, ff_rumble },
{ 0x046d, 0xc283, ff_joystick },
{ 0x046d, 0xc211, ff_rumble },
{ 0x046d, 0xc219, ff_rumble },
{ 0x046d, 0xc283, ff_joystick },
- { 0x0000, 0x0000, ff_joystick }
+ { 0x046d, 0xc294, ff_joystick },
+ { 0x046d, 0xc295, ff_joystick },
+ { 0x046d, 0xca03, ff_joystick },
};
static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *effect)
};
static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *effect)
@@
-104,8
+106,9
@@
int hid_lgff_init(struct hid_device* hid)
struct input_dev *dev = hidinput->input;
struct hid_report *report;
struct hid_field *field;
struct input_dev *dev = hidinput->input;
struct hid_report *report;
struct hid_field *field;
+ const signed short *ff_bits = ff_joystick;
int error;
int error;
- int i
, j
;
+ int i;
/* Find the report to use */
if (list_empty(report_list)) {
/* Find the report to use */
if (list_empty(report_list)) {
@@
-129,12
+132,14
@@
int hid_lgff_init(struct hid_device* hid)
for (i = 0; i < ARRAY_SIZE(devices); i++) {
if (dev->id.vendor == devices[i].idVendor &&
dev->id.product == devices[i].idProduct) {
for (i = 0; i < ARRAY_SIZE(devices); i++) {
if (dev->id.vendor == devices[i].idVendor &&
dev->id.product == devices[i].idProduct) {
- for (j = 0; devices[i].ff[j] >= 0; j++)
- set_bit(devices[i].ff[j], dev->ffbit);
+ ff_bits = devices[i].ff;
break;
}
}
break;
}
}
+ for (i = 0; ff_bits[i] >= 0; i++)
+ set_bit(ff_bits[i], dev->ffbit);
+
error = input_ff_create_memless(dev, NULL, hid_lgff_play);
if (error)
return error;
error = input_ff_create_memless(dev, NULL, hid_lgff_play);
if (error)
return error;