X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fmac_hid.c;h=cc9f27514aefe99a2e45da629e76050dab48a247;hb=073828d078d3e55b23b2b5937a49dc1019c5907d;hp=33dee3a773ed29ae4cad14fe9fa37203ba7cbfef;hpb=af5b14c49aad13de1c8e9e1abfbabe127c3af92e;p=linux-2.6-omap-h63xx.git diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index 33dee3a773e..cc9f27514ae 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -103,6 +103,9 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down) return 0; } +static struct lock_class_key emumousebtn_event_class; +static struct lock_class_key emumousebtn_mutex_class; + static int emumousebtn_input_register(void) { int ret; @@ -111,15 +114,19 @@ static int emumousebtn_input_register(void) if (!emumousebtn) return -ENOMEM; + lockdep_set_class(&emumousebtn->event_lock, &emumousebtn_event_class); + lockdep_set_class(&emumousebtn->mutex, &emumousebtn_mutex_class); + emumousebtn->name = "Macintosh mouse button emulation"; emumousebtn->id.bustype = BUS_ADB; emumousebtn->id.vendor = 0x0001; emumousebtn->id.product = 0x0001; emumousebtn->id.version = 0x0100; - emumousebtn->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); - emumousebtn->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); - emumousebtn->relbit[0] = BIT(REL_X) | BIT(REL_Y); + emumousebtn->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); + emumousebtn->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | + BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); + emumousebtn->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); ret = input_register_device(emumousebtn); if (ret)