summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-02 19:18:55 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2011-07-31 23:28:20 +0200
commita2495bc727e2dd8421fb85c80e38f9a4a4c1e58e (patch)
tree2e3617a8e7e6d8fafe966edf0bb08f5e6df20f03
parentd1738aef387ab9591a6d13b00945e248b942c53f (diff)
downloadlinux-a2495bc727e2dd8421fb85c80e38f9a4a4c1e58e.tar.bz2
mfd: Restructure wm8994-core device revision handling
Switch on the device type before revision since anything we do here will be device as well as revision specific. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/mfd/wm8994-core.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index e198d40292e7..18f19b7198a0 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -476,13 +476,18 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
goto err_enable;
}
- switch (ret) {
- case 0:
- case 1:
- if (wm8994->type == WM8994)
+ switch (wm8994->type) {
+ case WM8994:
+ switch (ret) {
+ case 0:
+ case 1:
dev_warn(wm8994->dev,
"revision %c not fully supported\n",
'A' + ret);
+ break;
+ default:
+ break;
+ }
break;
default:
break;