Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[cascardo/linux.git] / drivers / hid / hid-input.c
index 8703b2c..7f552bf 100644 (file)
@@ -327,21 +327,21 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 
                switch (field->application) {
                case HID_GD_MOUSE:
-               case HID_GD_POINTER:  code += 0x110; break;
+               case HID_GD_POINTER:  code += BTN_MOUSE; break;
                case HID_GD_JOYSTICK:
                                if (code <= 0xf)
                                        code += BTN_JOYSTICK;
                                else
                                        code += BTN_TRIGGER_HAPPY;
                                break;
-               case HID_GD_GAMEPAD:  code += 0x130; break;
+               case HID_GD_GAMEPAD:  code += BTN_GAMEPAD; break;
                default:
                        switch (field->physical) {
                        case HID_GD_MOUSE:
-                       case HID_GD_POINTER:  code += 0x110; break;
-                       case HID_GD_JOYSTICK: code += 0x120; break;
-                       case HID_GD_GAMEPAD:  code += 0x130; break;
-                       default:              code += 0x100;
+                       case HID_GD_POINTER:  code += BTN_MOUSE; break;
+                       case HID_GD_JOYSTICK: code += BTN_JOYSTICK; break;
+                       case HID_GD_GAMEPAD:  code += BTN_GAMEPAD; break;
+                       default:              code += BTN_MISC;
                        }
                }
 
@@ -825,14 +825,14 @@ static int hidinput_open(struct input_dev *dev)
 {
        struct hid_device *hid = input_get_drvdata(dev);
 
-       return hid->ll_driver->open(hid);
+       return hid_hw_open(hid);
 }
 
 static void hidinput_close(struct input_dev *dev)
 {
        struct hid_device *hid = input_get_drvdata(dev);
 
-       hid->ll_driver->close(hid);
+       hid_hw_close(hid);
 }
 
 /*
@@ -879,7 +879,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
                                if (!hidinput || !input_dev) {
                                        kfree(hidinput);
                                        input_free_device(input_dev);
-                                       err_hid("Out of memory during hid input probe");
+                                       hid_err(hid, "Out of memory during hid input probe\n");
                                        goto out_unwind;
                                }