[PATCH 03/27] cbus: tahvo: a switch looks better

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cleanup only, no functional changes.

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

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;
 	}
-- 
1.7.6.396.ge0613

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux