Skip to contentSkip to conversation

mfd: Restructure wm8994-core device revision handling

PATCH New Mark Brown 1 participant 1 message May 28, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/mfd/wm8994-core.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
drivers/mfd/wm8994-core.c +9 -4
index 877590b..9497c57 100644
@@ -482,13 +482,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;
Signature · 1 line
1.7.5.1