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:
Mark Brown 2011-06-02 19:18:55 +01:00 коммит произвёл Samuel Ortiz
Родитель d1738aef38
Коммит a2495bc727
1 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -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;