powerpc: Fix emulation of illegal instructions on PowerNV platform
[pandora-kernel.git] / drivers / hid / hid-magicmouse.c
index f0fbd7b..7cf3ffe 100644 (file)
@@ -405,12 +405,21 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
                        __set_bit(REL_HWHEEL, input->relbit);
                }
        } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
+               /* input->keybit is initialized with incorrect button info
+                * for Magic Trackpad. There really is only one physical
+                * button (BTN_LEFT == BTN_MOUSE). Make sure we don't
+                * advertise buttons that don't exist...
+                */
+               __clear_bit(BTN_RIGHT, input->keybit);
+               __clear_bit(BTN_MIDDLE, input->keybit);
                __set_bit(BTN_MOUSE, input->keybit);
                __set_bit(BTN_TOOL_FINGER, input->keybit);
                __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
                __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
                __set_bit(BTN_TOOL_QUADTAP, input->keybit);
                __set_bit(BTN_TOUCH, input->keybit);
+               __set_bit(INPUT_PROP_POINTER, input->propbit);
+               __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
        }
 
        if (report_touches) {