diff mbox

[2/3] power: bq27xxx_battery: move irq handler to i2c section

Message ID 1445003052-31373-3-git-send-email-sre@kernel.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sebastian Reichel Oct. 16, 2015, 1:44 p.m. UTC
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>
---
 drivers/power/bq27xxx_battery.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Pali Rohár Oct. 16, 2015, 2:48 p.m. UTC | #1
On Friday 16 October 2015 15:44:11 Sebastian Reichel wrote:
> 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>
> ---
>  drivers/power/bq27xxx_battery.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
> index 69e6b371a51c..880233ce9343 100644
> --- a/drivers/power/bq27xxx_battery.c
> +++ b/drivers/power/bq27xxx_battery.c
> @@ -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)
>  {

Acked-by: Pali Rohár <pali.rohar@gmail.com>
Andrew Davis Oct. 16, 2015, 3:06 p.m. UTC | #2
On 10/16/2015 08:44 AM, Sebastian Reichel wrote:
> 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>
> ---
>   drivers/power/bq27xxx_battery.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
> index 69e6b371a51c..880233ce9343 100644
> --- a/drivers/power/bq27xxx_battery.c
> +++ b/drivers/power/bq27xxx_battery.c
> @@ -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)
>   {
>

Acked-by: Andrew F. Davis <afd@ti.com>
diff mbox

Patch

diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
index 69e6b371a51c..880233ce9343 100644
--- a/drivers/power/bq27xxx_battery.c
+++ b/drivers/power/bq27xxx_battery.c
@@ -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)
 {