]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hid/usbhid/hid-lgff.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / drivers / hid / usbhid / hid-lgff.c
index e6f3af3e66d17f561114c556c296b51c24905271..4b7ab6a46d93b9d2e539820382a33b8edd76ee71 100644 (file)
@@ -52,6 +52,7 @@ static const struct dev_type devices[] = {
        { 0x046d, 0xc211, ff_rumble },
        { 0x046d, 0xc219, ff_rumble },
        { 0x046d, 0xc283, ff_joystick },
+       { 0x046d, 0xc286, ff_joystick },
        { 0x046d, 0xc294, ff_joystick },
        { 0x046d, 0xc295, ff_joystick },
        { 0x046d, 0xca03, ff_joystick },
@@ -59,7 +60,7 @@ static const struct dev_type devices[] = {
 
 static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *effect)
 {
-       struct hid_device *hid = dev->private;
+       struct hid_device *hid = input_get_drvdata(dev);
        struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
        struct hid_report *report = list_entry(report_list->next, struct hid_report, list);
        int x, y;
@@ -77,7 +78,7 @@ static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *ef
                report->field[0]->value[1] = 0x08;
                report->field[0]->value[2] = x;
                report->field[0]->value[3] = y;
-               dbg("(x, y)=(%04x, %04x)", x, y);
+               dbg_hid("(x, y)=(%04x, %04x)\n", x, y);
                usbhid_submit_report(hid, report, USB_DIR_OUT);
                break;
 
@@ -92,7 +93,7 @@ static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *ef
                report->field[0]->value[1] = 0x00;
                report->field[0]->value[2] = left;
                report->field[0]->value[3] = right;
-               dbg("(left, right)=(%04x, %04x)", left, right);
+               dbg_hid("(left, right)=(%04x, %04x)\n", left, right);
                usbhid_submit_report(hid, report, USB_DIR_OUT);
                break;
        }
@@ -112,20 +113,20 @@ int hid_lgff_init(struct hid_device* hid)
 
        /* Find the report to use */
        if (list_empty(report_list)) {
-               err("No output report found");
+               err_hid("No output report found");
                return -1;
        }
 
        /* Check that the report looks ok */
        report = list_entry(report_list->next, struct hid_report, list);
        if (!report) {
-               err("NULL output report");
+               err_hid("NULL output report");
                return -1;
        }
 
        field = report->field[0];
        if (!field) {
-               err("NULL field");
+               err_hid("NULL field");
                return -1;
        }