]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
I2C: TWL4030: sparse fixes for twl4030 driver
authorFelipe Balbi <felipe.balbi@nokia.com>
Fri, 11 Apr 2008 10:59:17 +0000 (13:59 +0300)
committerTony Lindgren <tony@atomide.com>
Fri, 11 Apr 2008 19:04:51 +0000 (12:04 -0700)
Get rid of some sparse warnings in twl4030 driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/twl4030-core.c
drivers/i2c/chips/twl4030-gpio.c
drivers/i2c/chips/twl4030-poweroff.c

index 953c247aa59ea89b7bdfecd70edfb357b34bbdb0..eedbebd75c859706208de78a38db364e90eca2b1 100644 (file)
@@ -638,7 +638,7 @@ static int twl4030_detach_client(struct i2c_client *client)
        return 0;
 }
 
-struct task_struct *start_twl4030_irq_thread(int irq)
+static struct task_struct *start_twl4030_irq_thread(int irq)
 {
        struct task_struct *thread;
 
index 349cbda13f16cd45ecdf8e5f4014d2e3e43be57b..c1f7107f2c7b2fdde957e9485831c54d4427adae 100644 (file)
@@ -190,9 +190,6 @@ static unsigned int gpio_pending_unmask;
 /* pointer to gpio unmask thread struct */
 static struct task_struct *gpio_unmask_thread;
 
-static inline int gpio_twl4030_read(u8 address);
-static inline int gpio_twl4030_write(u8 address, u8 data);
-
 /*
  * Helper functions to read and write the GPIO ISR and IMR registers as
  * 32-bit integers. Functions return 0 on success, non-zero otherwise.
@@ -311,6 +308,31 @@ static struct irq_chip twl4030_gpio_module_irq_chip = {
        .unmask = twl4030_gpio_module_unmask,
 };
 
+/*
+ * To configure TWL4030 GPIO module registers
+ */
+static inline int gpio_twl4030_write(u8 address, u8 data)
+{
+       int ret = 0;
+
+       ret = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, data, address);
+       return ret;
+}
+
+/*
+ * To read a TWL4030 GPIO module register
+ */
+static inline int gpio_twl4030_read(u8 address)
+{
+       u8 data;
+       int ret = 0;
+
+       ret = twl4030_i2c_read_u8(TWL4030_MODULE_GPIO, &data, address);
+       if (ret >= 0)
+               ret = data;
+       return ret;
+}
+
 /*
  * twl4030 GPIO request function
  */
@@ -595,31 +617,6 @@ EXPORT_SYMBOL(twl4030_set_gpio_card_detect);
 
 /* MODULE FUNCTIONS */
 
-/*
- * To configure TWL4030 GPIO module registers
- */
-static inline int gpio_twl4030_write(u8 address, u8 data)
-{
-       int ret = 0;
-
-       ret = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, data, address);
-       return ret;
-}
-
-/*
- * To read a TWL4030 GPIO module register
- */
-static inline int gpio_twl4030_read(u8 address)
-{
-       u8 data;
-       int ret = 0;
-
-       ret = twl4030_i2c_read_u8(TWL4030_MODULE_GPIO, &data, address);
-       if (ret >= 0)
-               ret = data;
-       return ret;
-}
-
 /*
  * gpio_unmask_thread() runs as a kernel thread.  It is awakened by the unmask
  * method for the GPIO interrupts.  It unmasks all of the GPIO interrupts
index dbe413a6d5c91f411ab87c3a5bc1390b9db0b0cd..57c7fc75d078cc1adb290ecc4d30e1369f315c90 100644 (file)
@@ -28,7 +28,7 @@
 #define PWR_P1_SW_EVENTS       0x10
 #define PWR_DEVOFF     (1<<0)
 
-void twl4030_poweroff(void)
+static void twl4030_poweroff(void)
 {
        u8 val;
        int err;