Commit 863df8d5 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Add missing WM5102 ifdefs

References to the WM5102 tables need to be guarded.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent cfe775ce
...@@ -368,6 +368,7 @@ int __devinit arizona_dev_init(struct arizona *arizona) ...@@ -368,6 +368,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
arizona->rev &= ARIZONA_DEVICE_REVISION_MASK; arizona->rev &= ARIZONA_DEVICE_REVISION_MASK;
switch (reg) { switch (reg) {
#ifdef CONFIG_MFD_WM5102
case 0x5102: case 0x5102:
type_name = "WM5102"; type_name = "WM5102";
if (arizona->type != WM5102) { if (arizona->type != WM5102) {
...@@ -377,7 +378,7 @@ int __devinit arizona_dev_init(struct arizona *arizona) ...@@ -377,7 +378,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
} }
ret = wm5102_patch(arizona); ret = wm5102_patch(arizona);
break; break;
#endif
default: default:
dev_err(arizona->dev, "Unknown device ID %x\n", reg); dev_err(arizona->dev, "Unknown device ID %x\n", reg);
goto err_reset; goto err_reset;
......
...@@ -30,9 +30,11 @@ static __devinit int arizona_i2c_probe(struct i2c_client *i2c, ...@@ -30,9 +30,11 @@ static __devinit int arizona_i2c_probe(struct i2c_client *i2c,
int ret; int ret;
switch (id->driver_data) { switch (id->driver_data) {
#ifdef CONFIG_MFD_WM5102
case WM5102: case WM5102:
regmap_config = &wm5102_i2c_regmap; regmap_config = &wm5102_i2c_regmap;
break; break;
#endif
default: default:
dev_err(&i2c->dev, "Unknown device type %ld\n", dev_err(&i2c->dev, "Unknown device type %ld\n",
id->driver_data); id->driver_data);
......
...@@ -158,10 +158,12 @@ int arizona_irq_init(struct arizona *arizona) ...@@ -158,10 +158,12 @@ int arizona_irq_init(struct arizona *arizona)
const struct regmap_irq_chip *aod, *irq; const struct regmap_irq_chip *aod, *irq;
switch (arizona->type) { switch (arizona->type) {
#ifdef CONFIG_MFD_WM5102
case WM5102: case WM5102:
aod = &wm5102_aod; aod = &wm5102_aod;
irq = &wm5102_irq; irq = &wm5102_irq;
break; break;
#endif
default: default:
BUG_ON("Unknown Arizona class device" == NULL); BUG_ON("Unknown Arizona class device" == NULL);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment