Skip to content

Commit

Permalink
mfd: Restructure wm8994-core device revision handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jul 31, 2011
1 parent d1738ae commit a2495bc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a2495bc

Please sign in to comment.