Commit a2495bc7 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent d1738aef
...@@ -476,10 +476,11 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) ...@@ -476,10 +476,11 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
goto err_enable; goto err_enable;
} }
switch (wm8994->type) {
case WM8994:
switch (ret) { switch (ret) {
case 0: case 0:
case 1: case 1:
if (wm8994->type == WM8994)
dev_warn(wm8994->dev, dev_warn(wm8994->dev,
"revision %c not fully supported\n", "revision %c not fully supported\n",
'A' + ret); 'A' + ret);
...@@ -487,6 +488,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) ...@@ -487,6 +488,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
default: default:
break; break;
} }
break;
default:
break;
}
dev_info(wm8994->dev, "%s revision %c\n", devname, 'A' + ret); dev_info(wm8994->dev, "%s revision %c\n", devname, 'A' + ret);
......
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