From patchwork Fri Jun 3 11:43:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 846452 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p53BqfTf028165 for ; Fri, 3 Jun 2011 11:52:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752950Ab1FCLn1 (ORCPT ); Fri, 3 Jun 2011 07:43:27 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:64723 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644Ab1FCLn1 (ORCPT ); Fri, 3 Jun 2011 07:43:27 -0400 Received: by fxm17 with SMTP id 17so1243381fxm.19 for ; Fri, 03 Jun 2011 04:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=qLnWmtozOpZu1QEOybprPNyHNYVQOAE2VUF1/7JgnXk=; b=aBPyipeDnsiJpHFTxg169fiWqAGUpEa1C5aLnTbr5qVWSYBuluvL7eeaII1IooiDJA 7qMzn+ukOWvBZUJMBZFrz/E/Ln5Rg8kcKh5u5w3Xo+GM3Y0ftcX3jhUsZHDYV5nPDosA 59N1ki39C62GsYlgGwHKJXWgYDroFdU6b3PHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=RGTAsghDoib90l7R14RSiX71AOxlA8S4ysL0Uhfj9rN7sXjmHGIcpK1MsAdHYpz5eC +bxxnqeEzGNVHYKMFUMer4VME04FK98t5HdoJ8+B9D6Bov0uRT+L8RYRC5URS183Eg+w eO6MGwkjGwAfNUfUywJL7vXortDRG54xqXGjE= Received: by 10.223.17.142 with SMTP id s14mr1984084faa.145.1307101405644; Fri, 03 Jun 2011 04:43:25 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id q21sm471351fan.40.2011.06.03.04.43.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Jun 2011 04:43:24 -0700 (PDT) From: Grazvydas Ignotas To: Anton Vorontsov Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Grazvydas Ignotas Subject: [PATCH] twl4030_charger: fix warnings Date: Fri, 3 Jun 2011 14:43:11 +0300 Message-Id: <1307101391-10898-1-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.7.0.4 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, 03 Jun 2011 11:52:42 +0000 (UTC) Fix warnings emitted by some versions of gcc: drivers/power/twl4030_charger.c:490: warning: overflow in implicit constant conversion drivers/power/twl4030_charger.c:498: warning: overflow in implicit constant conversion While at it, also fix module_param permissions and a typo in my name. Signed-off-by: Grazvydas Ignotas --- drivers/power/twl4030_charger.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index 92c16e1..54b9198 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -62,7 +62,7 @@ #define TWL4030_MSTATEC_COMPLETE4 0x0e static bool allow_usb; -module_param(allow_usb, bool, 1); +module_param(allow_usb, bool, 0644); MODULE_PARM_DESC(allow_usb, "Allow USB charge drawing default current"); struct twl4030_bci { @@ -425,7 +425,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) { struct twl4030_bci *bci; int ret; - int reg; + u32 reg; bci = kzalloc(sizeof(*bci), GFP_KERNEL); if (bci == NULL) @@ -486,7 +486,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) } /* Enable interrupts now. */ - reg = ~(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 | + reg = ~(u32)(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 | TWL4030_TBATOR1 | TWL4030_BATSTS); ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg, TWL4030_INTERRUPTS_BCIIMR1A); @@ -495,7 +495,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) goto fail_unmask_interrupts; } - reg = ~(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV); + reg = ~(u32)(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV); ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg, TWL4030_INTERRUPTS_BCIIMR2A); if (ret < 0) @@ -572,7 +572,7 @@ static void __exit twl4030_bci_exit(void) } module_exit(twl4030_bci_exit); -MODULE_AUTHOR("Gražydas Ignotas"); +MODULE_AUTHOR("Gražvydas Ignotas"); MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:twl4030_bci");