]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/keyboard/innovator_ps2.c
ARM: OMAP: Fix warnings in innovator_ps2:
[linux-2.6-omap-h63xx.git] / drivers / input / keyboard / innovator_ps2.c
index de07ce99a8beb563af0a51f5bdd274aa081d872a..c3bce96b43eba1c2a0788140c6c37df3776439f7 100644 (file)
@@ -93,7 +93,7 @@
 #include <linux/poll.h>
 #include <linux/string.h>
 #include <linux/ioport.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 
 #include <asm/io.h>
 #include <asm/hardware.h>
@@ -330,13 +330,10 @@ typedef struct _kdb_report_t {
 
 
 static u8 buffer[JUNO_BUFFER_SIZE];
-static u8 block[JUNO_BLOCK_SIZE];
 
 static void do_hid_tasklet(unsigned long);
 DECLARE_TASKLET(hid_tasklet, do_hid_tasklet, 0);
 static struct innovator_hid_dev *hid;
-static spinlock_t innovator_fpga_hid_lock = SPIN_LOCK_UNLOCKED;
-static atomic_t innovator_fpga_hid_busy = ATOMIC_INIT(0);
 
 struct innovator_hid_dev {
        struct input_dev mouse, keyboard;
@@ -378,12 +375,6 @@ innovator_fpga_hid_set_bits(u8 x)
        innovator_fpga_hid_frob(x, x);
 }
 
-static void
-innovator_fpga_hid_clear_bits(u8 x)
-{
-       innovator_fpga_hid_frob(x, 0);
-}
-
 static void
 SS(int value)
 {
@@ -697,13 +688,6 @@ report_async(void * p, int n)
        return ret;
 }
 
-static int
-verify_init(u8 * p)
-{
-       return (((simple_t *)p)->cmd_code == 0x01) ? 0 : -1;
-}
-
-
 /*
  * Host command helper functions:
  */
@@ -1148,57 +1132,45 @@ static void innovator_ps2_device_release(struct device *dev)
        /* Nothing */
 }
 
-static int innovator_ps2_suspend(struct device *dev, u32 state, u32 level)
+static int innovator_ps2_suspend(struct device *dev, pm_message_t state)
 {
-       u8 pmcomm;
-
-       
-       switch(level) {
-       case SUSPEND_DISABLE:
+       u8 pmcomm = 0;
 
-               /*
-                * Set SUS_STATE in REG_PM_COMM (Page 0 R0).  This will cause
-                * PM_MOD bits of REG_PM_STATUS to show suspended state,
-                * but the SUS_STAT bit of REG_PM_STATUS will continue to
-                * reflect the state of the _HSUS pin.
-                */
+       /*
+        * Set SUS_STATE in REG_PM_COMM (Page 0 R0).  This will cause
+        * PM_MOD bits of REG_PM_STATUS to show suspended state,
+        * but the SUS_STAT bit of REG_PM_STATUS will continue to
+        * reflect the state of the _HSUS pin.
+        */
 
-               if (write_reg(REG_PAGENO, 0) < 0)
-                       printk("ps2 suspend: write_reg REG_PAGENO error\n");
+       if (write_reg(REG_PAGENO, 0) < 0)
+               printk("ps2 suspend: write_reg REG_PAGENO error\n");
 
-               if (read_reg(REG_PM_COMM, &pmcomm) < 0)
-                       printk("ps2 suspend: read_reg REG_PM_COMM error\n");
+       if (read_reg(REG_PM_COMM, &pmcomm) < 0)
+               printk("ps2 suspend: read_reg REG_PM_COMM error\n");
                
-               if (write_reg(REG_PM_COMM, pmcomm | SUS_STATE) < 0)
-                       printk("ps2 suspend: write_reg REG_PM_COMM error\n");
-               break;
-       }
+       if (write_reg(REG_PM_COMM, pmcomm | SUS_STATE) < 0)
+               printk("ps2 suspend: write_reg REG_PM_COMM error\n");
 
        return 0;
 }
 
-static int innovator_ps2_resume(struct device *dev, u32 level)
+static int innovator_ps2_resume(struct device *dev)
 {
-       u8 pmcomm;
-
-       switch(level) {
-       case RESUME_ENABLE:
+       u8 pmcomm = 0;
 
-               /*
-                * Clear SUS_STATE from REG_PM_COMM (Page 0 R0).
-                */
+       /*
+        * Clear SUS_STATE from REG_PM_COMM (Page 0 R0).
+        */
 
-               if (write_reg(REG_PAGENO, 0) < 0)
-                       printk("ps2 resume: write_reg REG_PAGENO error\n");
-               
-               if (read_reg(REG_PM_COMM, &pmcomm) < 0)
-                       printk("ps2 resume: read_reg REG_PM_COMM error\n");
+       if (write_reg(REG_PAGENO, 0) < 0)
+               printk("ps2 resume: write_reg REG_PAGENO error\n");
 
-               if (write_reg(REG_PM_COMM, pmcomm & ~SUS_STATE) < 0)
-                       printk("ps2 resume: write_reg REG_PM_COMM error\n");
+       if (read_reg(REG_PM_COMM, &pmcomm) < 0)
+               printk("ps2 resume: read_reg REG_PM_COMM error\n");
 
-               break;
-       }
+       if (write_reg(REG_PM_COMM, pmcomm & ~SUS_STATE) < 0)
+               printk("ps2 resume: write_reg REG_PM_COMM error\n");
 
        return 0;
 }