From patchwork Fri Oct 16 13:44:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 7415411 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3B0CF9F1D5 for ; Fri, 16 Oct 2015 13:45:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5FE38209AF for ; Fri, 16 Oct 2015 13:44:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7EC82209BA for ; Fri, 16 Oct 2015 13:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932207AbbJPNo5 (ORCPT ); Fri, 16 Oct 2015 09:44:57 -0400 Received: from ring0.de ([5.45.105.125]:34750 "EHLO ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753061AbbJPNo5 (ORCPT ); Fri, 16 Oct 2015 09:44:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 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 3/3] power: bq27xxx_battery: fix defined but not used warnings Date: Fri, 16 Oct 2015 15:44:12 +0200 Message-Id: <1445003052-31373-4-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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If BQ27XXX is enabled, but neither I2C based initialization, nor platform based initialization are activated, bq27xxx_powersupply_init and bq27xxx_powersupply_unregister are defined but not used. This configuration doesn't make sense, but there is no easy way to make it unavailable in the build system, so just mark the functions as __maybe_unused instead. Signed-off-by: Sebastian Reichel --- drivers/power/bq27xxx_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c index 880233ce9343..452c9f079e0d 100644 --- a/drivers/power/bq27xxx_battery.c +++ b/drivers/power/bq27xxx_battery.c @@ -991,7 +991,7 @@ static void bq27xxx_external_power_changed(struct power_supply *psy) schedule_delayed_work(&di->work, 0); } -static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di, +static int __maybe_unused bq27xxx_powersupply_init(struct bq27xxx_device_info *di, const char *name) { int ret; @@ -1026,7 +1026,7 @@ static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di, return 0; } -static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di) +static void __maybe_unused bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di) { /* * power_supply_unregister call bq27xxx_battery_get_property which