From patchwork Wed Jan 9 10:06:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 13944 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 127CC23E2A for ; Wed, 9 Jan 2013 10:06:13 +0000 (UTC) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by fiordland.canonical.com (Postfix) with ESMTP id 940C5A190A6 for ; Wed, 9 Jan 2013 10:06:12 +0000 (UTC) Received: by mail-vb0-f42.google.com with SMTP id fa15so1357025vbb.15 for ; Wed, 09 Jan 2013 02:06:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=1aCHavFctFttZuvKhvpmlPVns817w3C1n0Z4CAYcv18=; b=L/19yEPjTiJm85DJXEn3rT8sP75zrJDlHo3zX2Irf0ea0jckq9ro8kOvvND6Rc72vA CvG+oKHq7PtSWcCcwtT/PG6I/d0qFygDU3cKoVilcmaY4116tuYnLQGl+QcDVZHUnNg6 84ZLH5CFRzGo9EznFuar+WFKKEEQAirIJWvU+iRjePZ5sQk5LNIXlHbZjRmuD4/Cq+hJ qMurY3KfFiFFpzRKZZqw2KM0n2u6+db16ADkDH/x7ClP0acT7gBkIb3NR3u52Gb4blFz 0Apvwfz3BhP+9DWjsUI9RcxA7w0k5OS7cuz0xmFiyoi8r7x/ggOhLAnqb7PhbGoJfl0O OXiA== X-Received: by 10.220.238.139 with SMTP id ks11mr86773121vcb.49.1357725972114; Wed, 09 Jan 2013 02:06:12 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp5861veb; Wed, 9 Jan 2013 02:06:10 -0800 (PST) X-Received: by 10.195.13.67 with SMTP id ew3mr19855198wjd.59.1357725969681; Wed, 09 Jan 2013 02:06:09 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by mx.google.com with ESMTPS id p8si3909694wix.38.2013.01.09.02.06.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Jan 2013 02:06:09 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.181 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.181; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.181 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f181.google.com with SMTP id t11so953642wey.26 for ; Wed, 09 Jan 2013 02:06:09 -0800 (PST) X-Received: by 10.180.88.138 with SMTP id bg10mr2263124wib.13.1357725969064; Wed, 09 Jan 2013 02:06:09 -0800 (PST) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id p2sm3524911wic.7.2013.01.09.02.06.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Jan 2013 02:06:08 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, sameo@linux.intel.com, Lee Jones Subject: [PATCH 1/3] mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM Date: Wed, 9 Jan 2013 10:06:03 +0000 Message-Id: <1357725965-27342-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlXbVf8rkESFJv86YQKcs2pfz9QVedM5cpkzKANztbZOHf5USWeBkX148i8u1JY6QR5mDPC drivers/mfd/ab8500-core.c:1015:21: error: ‘ab8500_bm_data’ undeclared here include/linux/mfd/abx500/ab8500-bm.h:445:13: warning: ‘ab8500_fg_reinit’ defined but not used include/linux/mfd/abx500/ab8500-bm.h:448:13: warning: ‘ab8500_charger_usb_state_changed’ defined but not used include/linux/mfd/abx500/ab8500-bm.h:451:29: warning: ‘ab8500_btemp_get’ defined but not used include/linux/mfd/abx500/ab8500-bm.h:455:12: warning: ‘ab8500_btemp_get_batctrl_temp’ defined but not used include/linux/mfd/abx500/ab8500-bm.h:463:12: warning: ‘ab8500_fg_inst_curr_blocking’ defined but not used include/linux/mfd/abx500/ab8500-bm.h:442:12: warning: ‘ab8500_fg_inst_curr_done’ defined but not used include/linux/mfd/abx500/ab8500-bm.h:447:26: warning: ‘ab8500_fg_get’ defined but not used Signed-off-by: Lee Jones --- drivers/mfd/ab8500-core.c | 1 + include/linux/mfd/abx500.h | 2 -- include/linux/mfd/abx500/ab8500-bm.h | 29 ++++------------------------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index e1650ba..4778bb1 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 2138bd3..e53dcfe 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h @@ -272,8 +272,6 @@ struct abx500_bm_data { const struct abx500_fg_parameters *fg_params; }; -extern struct abx500_bm_data ab8500_bm_data; - enum { NTC_EXTERNAL = 0, NTC_INTERNAL, diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h index 44310c9..9bd037d 100644 --- a/include/linux/mfd/abx500/ab8500-bm.h +++ b/include/linux/mfd/abx500/ab8500-bm.h @@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data { struct ab8500_btemp; struct ab8500_gpadc; struct ab8500_fg; + #ifdef CONFIG_AB8500_BM +extern struct abx500_bm_data ab8500_bm_data; + void ab8500_fg_reinit(void); void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); struct ab8500_btemp *ab8500_btemp_get(void); @@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res); int ab8500_fg_inst_curr_done(struct ab8500_fg *di); #else -int ab8500_fg_inst_curr_done(struct ab8500_fg *di) -{ -} -static void ab8500_fg_reinit(void) -{ -} -static void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA) -{ -} -static struct ab8500_btemp *ab8500_btemp_get(void) -{ - return NULL; -} -static int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp) -{ - return 0; -} -struct ab8500_fg *ab8500_fg_get(void) -{ - return NULL; -} -static int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev) -{ - return -ENODEV; -} +static struct abx500_bm_data ab8500_bm_data; static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) {