From patchwork Fri Jul 8 22:52:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 957602 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p68MqtrU025192 for ; Fri, 8 Jul 2011 22:52:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752287Ab1GHWwz (ORCPT ); Fri, 8 Jul 2011 18:52:55 -0400 Received: from na3sys009aog125.obsmtp.com ([74.125.149.153]:59229 "EHLO na3sys009aog125.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258Ab1GHWwy (ORCPT ); Fri, 8 Jul 2011 18:52:54 -0400 Received: from mail-bw0-f47.google.com ([209.85.214.47]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKTheKRVRvmWkC2bQj37DS0PayWq5h/DqG@postini.com; Fri, 08 Jul 2011 15:52:54 PDT Received: by mail-bw0-f47.google.com with SMTP id 20so2484507bwf.20 for ; Fri, 08 Jul 2011 15:52:53 -0700 (PDT) Received: by 10.204.153.208 with SMTP id l16mr578020bkw.342.1310165573362; Fri, 08 Jul 2011 15:52:53 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id f16sm3500298bke.4.2011.07.08.15.52.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 15:52:52 -0700 (PDT) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Felipe Balbi Subject: [PATCH 03/11] cbus: tahvo: a switch looks better Date: Sat, 9 Jul 2011 01:52:31 +0300 Message-Id: <1310165559-31037-4-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1310165559-31037-1-git-send-email-balbi@ti.com> References: <1310165559-31037-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 08 Jul 2011 22:52:56 +0000 (UTC) cleanup only, no functional changes. Signed-off-by: Felipe Balbi --- 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; }