]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hid/usbhid/hid-zpff.c
Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release
[linux-2.6-omap-h63xx.git] / drivers / hid / usbhid / hid-zpff.c
index 7bd8238ca2125b61fe71f112cf18c4721599e6cb..5a688274f6a3331d2264d10de5fff780de473b9c 100644 (file)
  */
 
 
-/* #define DEBUG */
-
-#define debug(format, arg...) pr_debug("hid-zpff: " format "\n" , ## arg)
-
 #include <linux/input.h>
 #include <linux/usb.h>
 #include <linux/hid.h>
@@ -37,7 +33,7 @@ struct zpff_device {
 static int hid_zpff_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 zpff_device *zpff = data;
        int left, right;
 
@@ -49,14 +45,14 @@ static int hid_zpff_play(struct input_dev *dev, void *data,
 
        left = effect->u.rumble.strong_magnitude;
        right = effect->u.rumble.weak_magnitude;
-       debug("called with 0x%04x 0x%04x", left, right);
+       dbg_hid("called with 0x%04x 0x%04x\n", left, right);
 
        left = left * 0x7f / 0xffff;
        right = right * 0x7f / 0xffff;
 
        zpff->report->field[2]->value[0] = left;
        zpff->report->field[3]->value[0] = right;
-       debug("running with 0x%02x 0x%02x", left, right);
+       dbg_hid("running with 0x%02x 0x%02x\n", left, right);
        usbhid_submit_report(hid, zpff->report, USB_DIR_OUT);
 
        return 0;