提交 41a90db8 编写于 作者: S Sebastian Reichel

power: bq27xxx_battery: move irq handler to i2c section

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: NSebastian Reichel <sre@kernel.org>
Acked-by: NPali Rohár <pali.rohar@gmail.com>
Acked-by: NAndrew F. Davis <afd@ti.com>
上级 0077ae7e
...@@ -762,15 +762,6 @@ static void bq27xxx_battery_update(struct bq27xxx_device_info *di) ...@@ -762,15 +762,6 @@ static void bq27xxx_battery_update(struct bq27xxx_device_info *di)
di->last_update = jiffies; 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) static void bq27xxx_battery_poll(struct work_struct *work)
{ {
struct bq27xxx_device_info *di = struct bq27xxx_device_info *di =
...@@ -1061,6 +1052,15 @@ static void bq27xxx_powersupply_unregister(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_IDR(battery_id);
static DEFINE_MUTEX(battery_mutex); 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, static int bq27xxx_battery_i2c_read(struct bq27xxx_device_info *di, u8 reg,
bool single) bool single)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册