From patchwork Mon Jul 11 11:17:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 964002 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 p6BBI9GM021529 for ; Mon, 11 Jul 2011 11:18:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754864Ab1GKLSC (ORCPT ); Mon, 11 Jul 2011 07:18:02 -0400 Received: from na3sys009aog124.obsmtp.com ([74.125.149.151]:36606 "EHLO na3sys009aog124.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754826Ab1GKLSA (ORCPT ); Mon, 11 Jul 2011 07:18:00 -0400 Received: from mail-yw0-f50.google.com ([209.85.213.50]) (using TLSv1) by na3sys009aob124.postini.com ([74.125.148.12]) with SMTP ID DSNKThrb6HURSPli5cmv3Vd/xjOUgWMiVoi2@postini.com; Mon, 11 Jul 2011 04:18:00 PDT Received: by ywa6 with SMTP id 6so1925075ywa.23 for ; Mon, 11 Jul 2011 04:17:59 -0700 (PDT) Received: by 10.236.175.169 with SMTP id z29mr5284907yhl.328.1310383079514; Mon, 11 Jul 2011 04:17:59 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id p50sm4505389yhj.56.2011.07.11.04.17.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 04:17:58 -0700 (PDT) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , =?UTF-8?q?Michael=20B=C3=BCsch?= , Felipe Balbi Subject: [PATCH 03/22] cbus: tahvo: a switch looks better Date: Mon, 11 Jul 2011 14:17:16 +0300 Message-Id: <1310383055-20211-4-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1310383055-20211-1-git-send-email-balbi@ti.com> References: <1310383055-20211-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]); Mon, 11 Jul 2011 11:18:09 +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; }