aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/xpad.c4
-rw-r--r--drivers/input/keyboard/omap-keypad.c27
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c10
-rw-r--r--drivers/input/serio/hp_sdc.c2
-rw-r--r--drivers/input/serio/i8042-io.h2
5 files changed, 21 insertions, 24 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6791be81eb29..839d1c9622f6 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -455,10 +455,10 @@ static void xpad_bulk_out(struct urb *urb)
455 case -ENOENT: 455 case -ENOENT:
456 case -ESHUTDOWN: 456 case -ESHUTDOWN:
457 /* this urb is terminated, clean up */ 457 /* this urb is terminated, clean up */
458 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); 458 dbg("%s - urb shutting down with status: %d", __func__, urb->status);
459 break; 459 break;
460 default: 460 default:
461 dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); 461 dbg("%s - nonzero urb status received: %d", __func__, urb->status);
462 } 462 }
463} 463}
464 464
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 039787f81ed8..69e674ecf19a 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -72,12 +72,9 @@ static unsigned int *col_gpios;
72static void set_col_gpio_val(struct omap_kp *omap_kp, u8 value) 72static void set_col_gpio_val(struct omap_kp *omap_kp, u8 value)
73{ 73{
74 int col; 74 int col;
75 for (col = 0; col < omap_kp->cols; col++) { 75
76 if (value & (1 << col)) 76 for (col = 0; col < omap_kp->cols; col++)
77 omap_set_gpio_dataout(col_gpios[col], 1); 77 gpio_set_value(col_gpios[col], value & (1 << col));
78 else
79 omap_set_gpio_dataout(col_gpios[col], 0);
80 }
81} 78}
82 79
83static u8 get_row_gpio_val(struct omap_kp *omap_kp) 80static u8 get_row_gpio_val(struct omap_kp *omap_kp)
@@ -86,7 +83,7 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp)
86 u8 value = 0; 83 u8 value = 0;
87 84
88 for (row = 0; row < omap_kp->rows; row++) { 85 for (row = 0; row < omap_kp->rows; row++) {
89 if (omap_get_gpio_datain(row_gpios[row])) 86 if (gpio_get_value(row_gpios[row]))
90 value |= (1 << row); 87 value |= (1 << row);
91 } 88 }
92 return value; 89 return value;
@@ -333,23 +330,23 @@ static int __init omap_kp_probe(struct platform_device *pdev)
333 if (cpu_is_omap24xx()) { 330 if (cpu_is_omap24xx()) {
334 /* Cols: outputs */ 331 /* Cols: outputs */
335 for (col_idx = 0; col_idx < omap_kp->cols; col_idx++) { 332 for (col_idx = 0; col_idx < omap_kp->cols; col_idx++) {
336 if (omap_request_gpio(col_gpios[col_idx]) < 0) { 333 if (gpio_request(col_gpios[col_idx], "omap_kp_col") < 0) {
337 printk(KERN_ERR "Failed to request" 334 printk(KERN_ERR "Failed to request"
338 "GPIO%d for keypad\n", 335 "GPIO%d for keypad\n",
339 col_gpios[col_idx]); 336 col_gpios[col_idx]);
340 goto err1; 337 goto err1;
341 } 338 }
342 omap_set_gpio_direction(col_gpios[col_idx], 0); 339 gpio_direction_output(col_gpios[col_idx], 0);
343 } 340 }
344 /* Rows: inputs */ 341 /* Rows: inputs */
345 for (row_idx = 0; row_idx < omap_kp->rows; row_idx++) { 342 for (row_idx = 0; row_idx < omap_kp->rows; row_idx++) {
346 if (omap_request_gpio(row_gpios[row_idx]) < 0) { 343 if (gpio_request(row_gpios[row_idx], "omap_kp_row") < 0) {
347 printk(KERN_ERR "Failed to request" 344 printk(KERN_ERR "Failed to request"
348 "GPIO%d for keypad\n", 345 "GPIO%d for keypad\n",
349 row_gpios[row_idx]); 346 row_gpios[row_idx]);
350 goto err2; 347 goto err2;
351 } 348 }
352 omap_set_gpio_direction(row_gpios[row_idx], 1); 349 gpio_direction_input(row_gpios[row_idx]);
353 } 350 }
354 } else { 351 } else {
355 col_idx = 0; 352 col_idx = 0;
@@ -418,10 +415,10 @@ err3:
418 device_remove_file(&pdev->dev, &dev_attr_enable); 415 device_remove_file(&pdev->dev, &dev_attr_enable);
419err2: 416err2:
420 for (i = row_idx - 1; i >=0; i--) 417 for (i = row_idx - 1; i >=0; i--)
421 omap_free_gpio(row_gpios[i]); 418 gpio_free(row_gpios[i]);
422err1: 419err1:
423 for (i = col_idx - 1; i >=0; i--) 420 for (i = col_idx - 1; i >=0; i--)
424 omap_free_gpio(col_gpios[i]); 421 gpio_free(col_gpios[i]);
425 422
426 kfree(omap_kp); 423 kfree(omap_kp);
427 input_free_device(input_dev); 424 input_free_device(input_dev);
@@ -438,9 +435,9 @@ static int omap_kp_remove(struct platform_device *pdev)
438 if (cpu_is_omap24xx()) { 435 if (cpu_is_omap24xx()) {
439 int i; 436 int i;
440 for (i = 0; i < omap_kp->cols; i++) 437 for (i = 0; i < omap_kp->cols; i++)
441 omap_free_gpio(col_gpios[i]); 438 gpio_free(col_gpios[i]);
442 for (i = 0; i < omap_kp->rows; i++) { 439 for (i = 0; i < omap_kp->rows; i++) {
443 omap_free_gpio(row_gpios[i]); 440 gpio_free(row_gpios[i]);
444 free_irq(OMAP_GPIO_IRQ(row_gpios[i]), 0); 441 free_irq(OMAP_GPIO_IRQ(row_gpios[i]), 0);
445 } 442 }
446 } else { 443 } else {
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index daa9d4220331..82ec6b1b6467 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -458,35 +458,35 @@ static int hp_sdc_rtc_proc_output (char *buf)
458 p += sprintf(p, "i8042 rtc\t: READ FAILED!\n"); 458 p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
459 } else { 459 } else {
460 p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n", 460 p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n",
461 tv.tv_sec, tv.tv_usec/1000); 461 tv.tv_sec, (int)tv.tv_usec/1000);
462 } 462 }
463 463
464 if (hp_sdc_rtc_read_fhs(&tv)) { 464 if (hp_sdc_rtc_read_fhs(&tv)) {
465 p += sprintf(p, "handshake\t: READ FAILED!\n"); 465 p += sprintf(p, "handshake\t: READ FAILED!\n");
466 } else { 466 } else {
467 p += sprintf(p, "handshake\t: %ld.%02d seconds\n", 467 p += sprintf(p, "handshake\t: %ld.%02d seconds\n",
468 tv.tv_sec, tv.tv_usec/1000); 468 tv.tv_sec, (int)tv.tv_usec/1000);
469 } 469 }
470 470
471 if (hp_sdc_rtc_read_mt(&tv)) { 471 if (hp_sdc_rtc_read_mt(&tv)) {
472 p += sprintf(p, "alarm\t\t: READ FAILED!\n"); 472 p += sprintf(p, "alarm\t\t: READ FAILED!\n");
473 } else { 473 } else {
474 p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n", 474 p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n",
475 tv.tv_sec, tv.tv_usec/1000); 475 tv.tv_sec, (int)tv.tv_usec/1000);
476 } 476 }
477 477
478 if (hp_sdc_rtc_read_dt(&tv)) { 478 if (hp_sdc_rtc_read_dt(&tv)) {
479 p += sprintf(p, "delay\t\t: READ FAILED!\n"); 479 p += sprintf(p, "delay\t\t: READ FAILED!\n");
480 } else { 480 } else {
481 p += sprintf(p, "delay\t\t: %ld.%02d seconds\n", 481 p += sprintf(p, "delay\t\t: %ld.%02d seconds\n",
482 tv.tv_sec, tv.tv_usec/1000); 482 tv.tv_sec, (int)tv.tv_usec/1000);
483 } 483 }
484 484
485 if (hp_sdc_rtc_read_ct(&tv)) { 485 if (hp_sdc_rtc_read_ct(&tv)) {
486 p += sprintf(p, "periodic\t: READ FAILED!\n"); 486 p += sprintf(p, "periodic\t: READ FAILED!\n");
487 } else { 487 } else {
488 p += sprintf(p, "periodic\t: %ld.%02d seconds\n", 488 p += sprintf(p, "periodic\t: %ld.%02d seconds\n",
489 tv.tv_sec, tv.tv_usec/1000); 489 tv.tv_sec, (int)tv.tv_usec/1000);
490 } 490 }
491 491
492 p += sprintf(p, 492 p += sprintf(p,
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
index 0d395979b2d1..bfe49243f38b 100644
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -323,7 +323,7 @@ static void hp_sdc_tasklet(unsigned long foo)
323 * it back to the application. and be less verbose. 323 * it back to the application. and be less verbose.
324 */ 324 */
325 printk(KERN_WARNING PREFIX "read timeout (%ius)!\n", 325 printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
326 tv.tv_usec - hp_sdc.rtv.tv_usec); 326 (int)(tv.tv_usec - hp_sdc.rtv.tv_usec));
327 curr->idx += hp_sdc.rqty; 327 curr->idx += hp_sdc.rqty;
328 hp_sdc.rqty = 0; 328 hp_sdc.rqty = 0;
329 tmp = curr->seq[curr->actidx]; 329 tmp = curr->seq[curr->actidx];
diff --git a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h
index f451c7351a9d..847f4aad7ed5 100644
--- a/drivers/input/serio/i8042-io.h
+++ b/drivers/input/serio/i8042-io.h
@@ -67,7 +67,7 @@ static inline int i8042_platform_init(void)
67 * On some platforms touching the i8042 data register region can do really 67 * On some platforms touching the i8042 data register region can do really
68 * bad things. Because of this the region is always reserved on such boxes. 68 * bad things. Because of this the region is always reserved on such boxes.
69 */ 69 */
70#if defined(CONFIG_PPC_MERGE) 70#if defined(CONFIG_PPC)
71 if (check_legacy_ioport(I8042_DATA_REG)) 71 if (check_legacy_ioport(I8042_DATA_REG))
72 return -ENODEV; 72 return -ENODEV;
73#endif 73#endif