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>
This commit is contained in:
parent
d1738aef38
commit
a2495bc727
@ -476,10 +476,11 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
|
||||
goto err_enable;
|
||||
}
|
||||
|
||||
switch (wm8994->type) {
|
||||
case WM8994:
|
||||
switch (ret) {
|
||||
case 0:
|
||||
case 1:
|
||||
if (wm8994->type == WM8994)
|
||||
dev_warn(wm8994->dev,
|
||||
"revision %c not fully supported\n",
|
||||
'A' + ret);
|
||||
@ -487,6 +488,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
dev_info(wm8994->dev, "%s revision %c\n", devname, 'A' + ret);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user