mfd: Add missing WM5102 ifdefs
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 5 Jul 2012 19:35:31 +0000 (20:35 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 8 Jul 2012 22:39:07 +0000 (00:39 +0200)
References to the WM5102 tables need to be guarded.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/arizona-core.c
drivers/mfd/arizona-i2c.c
drivers/mfd/arizona-irq.c

index 03aef6750a9da5a961cb7f6492c7f1c6d3b0647a..7f837edfbfb7c3410bd0a523c8b1a781dee34e83 100644 (file)
@@ -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;
index 75fb110105e10a22f17945950440731c7cc3a049..fe19d11b92f004dc01b2f4047751990859b60d4f 100644 (file)
@@ -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);
index 4c7894046a392360636d0ce181217e3e774fa2e6..17d20c0fba1e7d3ddc9d175586f575d4b39a5a66 100644 (file)
@@ -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;