]> git.karo-electronics.de Git - linux-beck.git/commitdiff
power: bq27xxx_battery: move irq handler to i2c section
authorSebastian Reichel <sre@kernel.org>
Fri, 16 Oct 2015 13:44:11 +0000 (15:44 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 19 Oct 2015 08:38:03 +0000 (10:38 +0200)
The IRQ handler is not used by the platform based
code resulting in a 'defined but not used' warning,
if CONFIG_BQ27XXX_I2C is not enabled.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Andrew F. Davis <afd@ti.com>
drivers/power/bq27xxx_battery.c

index 69e6b371a51c7f331524450c7e9b89eba238f0c9..880233ce9343809999ead8d957d65054c076b592 100644 (file)
@@ -762,15 +762,6 @@ static void bq27xxx_battery_update(struct bq27xxx_device_info *di)
        di->last_update = jiffies;
 }
 
-static irqreturn_t bq27xxx_battery_irq_handler_thread(int irq, void *data)
-{
-       struct bq27xxx_device_info *di = data;
-
-       bq27xxx_battery_update(di);
-
-       return IRQ_HANDLED;
-}
-
 static void bq27xxx_battery_poll(struct work_struct *work)
 {
        struct bq27xxx_device_info *di =
@@ -1061,6 +1052,15 @@ static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di)
 static DEFINE_IDR(battery_id);
 static DEFINE_MUTEX(battery_mutex);
 
+static irqreturn_t bq27xxx_battery_irq_handler_thread(int irq, void *data)
+{
+       struct bq27xxx_device_info *di = data;
+
+       bq27xxx_battery_update(di);
+
+       return IRQ_HANDLED;
+}
+
 static int bq27xxx_battery_i2c_read(struct bq27xxx_device_info *di, u8 reg,
                                    bool single)
 {