mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
	patches@opensource.wolfsonmicro.com,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 4/6] mfd: arizona: Add missing WM5102 ifdefs
Date: Thu,  5 Jul 2012 20:35:31 +0100	[thread overview]
Message-ID: <1341516933-16474-4-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1341516933-16474-1-git-send-email-broonie@opensource.wolfsonmicro.com>

References to the WM5102 tables need to be guarded.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mfd/arizona-core.c |    3 ++-
 drivers/mfd/arizona-i2c.c  |    2 ++
 drivers/mfd/arizona-irq.c  |    2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 3a4ced2..4d249ed 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -368,6 +368,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
 	arizona->rev &= ARIZONA_DEVICE_REVISION_MASK;
 
 	switch (reg) {
+#ifdef CONFIG_MFD_WM5102
 	case 0x5102:
 		type_name = "WM5102";
 		if (arizona->type != WM5102) {
@@ -377,7 +378,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
 		}
 		ret = wm5102_patch(arizona);
 		break;
-
+#endif
 	default:
 		dev_err(arizona->dev, "Unknown device ID %x\n", reg);
 		goto err_reset;
diff --git a/drivers/mfd/arizona-i2c.c b/drivers/mfd/arizona-i2c.c
index 75fb110..fe19d11 100644
--- a/drivers/mfd/arizona-i2c.c
+++ b/drivers/mfd/arizona-i2c.c
@@ -30,9 +30,11 @@ static __devinit int arizona_i2c_probe(struct i2c_client *i2c,
 	int ret;
 
 	switch (id->driver_data) {
+#ifdef CONFIG_MFD_WM5102
 	case WM5102:
 		regmap_config = &wm5102_i2c_regmap;
 		break;
+#endif
 	default:
 		dev_err(&i2c->dev, "Unknown device type %ld\n",
 			id->driver_data);
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index 4c78940..17d20c0 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -158,10 +158,12 @@ int arizona_irq_init(struct arizona *arizona)
 	const struct regmap_irq_chip *aod, *irq;
 
 	switch (arizona->type) {
+#ifdef CONFIG_MFD_WM5102
 	case WM5102:
 		aod = &wm5102_aod;
 		irq = &wm5102_irq;
 		break;
+#endif
 	default:
 		BUG_ON("Unknown Arizona class device" == NULL);
 		return -EINVAL;
-- 
1.7.10


  parent reply	other threads:[~2012-07-05 19:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 19:35 [PATCH 1/6] mfd: arizona: Add more register definitions Mark Brown
2012-07-05 19:35 ` [PATCH 2/6] mfd: arizona: Release DCVDD if we fail to resume the device Mark Brown
2012-07-05 19:35 ` [PATCH 3/6] mfd: arizona: Treat register read errors as non-fatal during resume Mark Brown
2012-07-05 19:35 ` Mark Brown [this message]
2012-07-05 19:35 ` [PATCH 5/6] mfd: arizona: Don't free unallocated supplies on error Mark Brown
2012-07-05 19:35 ` [PATCH 6/6] mfd: wm5102: Mark headphone detect readback register volatile Mark Brown
2012-07-08 22:47 ` [PATCH 1/6] mfd: arizona: Add more register definitions Samuel Ortiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341516933-16474-4-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome