All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Felipe Balbi <balbi@ti.com>
Subject: [PATCH 03/11] cbus: tahvo: a switch looks better
Date: Sat,  9 Jul 2011 01:52:31 +0300	[thread overview]
Message-ID: <1310165559-31037-4-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1310165559-31037-1-git-send-email-balbi@ti.com>

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


  parent reply	other threads:[~2011-07-08 22:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 22:52 [PATCH 00/11] Tahvo cleanups and Retu optimization Felipe Balbi
2011-07-08 22:52 ` [PATCH 01/11] cbus: tahvo: convert spinlock into mutex Felipe Balbi
2011-07-08 22:52 ` [PATCH 02/11] cbus: tahvo: move to __devinit/__devexit sections Felipe Balbi
2011-07-08 22:52 ` Felipe Balbi [this message]
2011-07-08 22:52 ` [PATCH 04/11] cbus: tahvo: don't go over 80 columns Felipe Balbi
2011-07-08 22:52 ` [PATCH 05/11] cbus: tahvo: drop the tasklet Felipe Balbi
2011-07-08 22:52 ` [PATCH 06/11] cbus: retu: set IRQF_ONESHOT flag Felipe Balbi
2011-07-08 22:52 ` [PATCH 07/11] cbus: tahvo: git it a context structure Felipe Balbi
2011-07-08 22:52 ` [PATCH 08/11] cbus: tahvo: pass tahvo to IRQ handler Felipe Balbi
2011-07-08 22:52 ` [PATCH 09/11] cbus: tahvo: introduce __tahvo_(read/write)_reg Felipe Balbi
2011-07-08 22:52 ` [PATCH 10/11] cbus: tahvo: drop some unneded defines Felipe Balbi
2011-07-08 22:52 ` [PATCH 11/11] cbus: retu: IRQ demux optimization Felipe Balbi
2011-07-11 11:13 ` [PATCH 00/11] Tahvo cleanups and Retu optimization Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310165559-31037-4-git-send-email-balbi@ti.com \
    --to=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.