diff mbox

[03/11] cbus: tahvo: a switch looks better

Message ID 1310165559-31037-4-git-send-email-balbi@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Felipe Balbi July 8, 2011, 10:52 p.m. UTC
cleanup only, no functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/cbus/tahvo.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/cbus/tahvo.c b/drivers/cbus/tahvo.c
index 0da156e..647d263 100644
--- a/drivers/cbus/tahvo.c
+++ b/drivers/cbus/tahvo.c
@@ -284,13 +284,17 @@  static int __devinit tahvo_probe(struct platform_device *pdev)
 	rev = tahvo_read_reg(TAHVO_REG_ASICR);
 
 	id = (rev >> 8) & 0xff;
-	if (id == 0x03) {
+
+	switch (id) {
+	case 0x03:
 		if ((rev & 0xff) >= 0x50)
 			tahvo_7bit_backlight = 1;
-	} else if (id == 0x0b) {
+		break;
+	case 0x0b:
 		tahvo_is_betty = 1;
 		tahvo_7bit_backlight = 1;
-	} else {
+		break;
+	default:
 		dev_err(&pdev->dev, "Tahvo/Betty chip not found");
 		return -ENODEV;
 	}