[PATCH] Input: fix cobalt_btns build error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix cobalt_btns build error.

drivers/input/misc/cobalt_btns.c: In function 'cobalt_buttons_probe':
drivers/input/misc/cobalt_btns.c:109: warning: dereferencing 'void *' pointer
drivers/input/misc/cobalt_btns.c:109: error: invalid use of void expression
make[3]: *** [drivers/input/misc/cobalt_btns.o] Error 1
make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx>

diff -pruN -X /home/yuasa/Memo/dontdiff linux-orig/drivers/input/misc/cobalt_btns.c linux/drivers/input/misc/cobalt_btns.c
--- linux-orig/drivers/input/misc/cobalt_btns.c	2008-03-14 22:44:02.563995073 +0900
+++ linux/drivers/input/misc/cobalt_btns.c	2008-03-14 23:10:12.844238925 +0900
@@ -106,7 +106,7 @@ static int __devinit cobalt_buttons_prob
 	input_set_capability(input, EV_MSC, MSC_SCAN);
 	__set_bit(EV_KEY, input->evbit);
 	for (i = 0; i < input->keycodemax; i++)
-		__set_bit(input->keycode[i], input->keybit);
+		__set_bit(((unsigned short *)input->keycode)[i], input->keybit);
 	__clear_bit(KEY_RESERVED, input->keybit);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux