X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fmac_hid.c;h=89302309da92d56f397096ad8412a4e7fa2ef1d4;hb=444ad82bc3eaa554be40d22dc248e58aeefd54d9;hp=c1fd816e9f09d282b9ec8cd5678dcb2c84ef3f1f;hpb=6f8c480f998a619082f18407f8d7f4c29e94dc6e;p=linux-2.6 diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index c1fd816e9f..89302309da 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -13,6 +13,7 @@ #include #include #include +#include static struct input_dev *emumousebtn; @@ -24,7 +25,7 @@ static int mouse_last_keycode; #if defined(CONFIG_SYSCTL) /* file(s) in /proc/sys/dev/mac_hid */ -ctl_table mac_hid_files[] = { +static ctl_table mac_hid_files[] = { { .ctl_name = DEV_MAC_HID_MOUSE_BUTTON_EMULATION, .procname = "mouse_button_emulation", @@ -53,7 +54,7 @@ ctl_table mac_hid_files[] = { }; /* dir in /proc/sys/dev */ -ctl_table mac_hid_dir[] = { +static ctl_table mac_hid_dir[] = { { .ctl_name = DEV_MAC_HID, .procname = "mac_hid", @@ -65,7 +66,7 @@ ctl_table mac_hid_dir[] = { }; /* /proc/sys/dev itself, in case that is not there yet */ -ctl_table mac_hid_root_dir[] = { +static ctl_table mac_hid_root_dir[] = { { .ctl_name = CTL_DEV, .procname = "dev", @@ -102,8 +103,6 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down) return 0; } -EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons); - static int emumousebtn_input_register(void) { int ret; @@ -118,9 +117,10 @@ static int emumousebtn_input_register(void) 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) @@ -129,7 +129,7 @@ static int emumousebtn_input_register(void) return ret; } -int __init mac_hid_init(void) +static int __init mac_hid_init(void) { int err;