From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932540AbbJPNyr (ORCPT ); Fri, 16 Oct 2015 09:54:47 -0400 Received: from ring0.de ([5.45.105.125]:35189 "EHLO ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932254AbbJPNyo (ORCPT ); Fri, 16 Oct 2015 09:54:44 -0400 X-Spam-Report: * 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail * domains are different * -0.0 NO_RELAYS Informational: message was not relayed via SMTP * -1.9 BAYES_00 BODY: Spamwahrscheinlichkeit nach Bayes-Test: 0-1% * [score: 0.0000] * -0.0 NO_RECEIVED Informational: message has no Received headers * 0.0 TXREP TXREP: Score normalizing based on sender's reputation From: Sebastian Reichel To: Sebastian Reichel Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= , "Andrew F . Davis" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] power: bq27xxx_battery: move irq handler to i2c section Date: Fri, 16 Oct 2015 15:44:11 +0200 Message-Id: <1445003052-31373-3-git-send-email-sre@kernel.org> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1445003052-31373-1-git-send-email-sre@kernel.org> References: <1445003052-31373-1-git-send-email-sre@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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) { -- 2.6.1