diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2011-06-03 07:43:11 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-07-08 08:57:59 -0400 |
commit | 28d48f04ead41438f14d167fe61fd179de7029f3 (patch) | |
tree | 04b82212bc3b185e6cc8407ab5b147712e718527 /drivers/power | |
parent | ccf8fa2d1b4dd8660aadc830f22645781628b894 (diff) |
twl4030_charger: Fix warnings
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 <notasas@gmail.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | 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 92c16e1677bd..54b9198fa576 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c | |||
@@ -62,7 +62,7 @@ | |||
62 | #define TWL4030_MSTATEC_COMPLETE4 0x0e | 62 | #define TWL4030_MSTATEC_COMPLETE4 0x0e |
63 | 63 | ||
64 | static bool allow_usb; | 64 | static bool allow_usb; |
65 | module_param(allow_usb, bool, 1); | 65 | module_param(allow_usb, bool, 0644); |
66 | MODULE_PARM_DESC(allow_usb, "Allow USB charge drawing default current"); | 66 | MODULE_PARM_DESC(allow_usb, "Allow USB charge drawing default current"); |
67 | 67 | ||
68 | struct twl4030_bci { | 68 | struct twl4030_bci { |
@@ -425,7 +425,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) | |||
425 | { | 425 | { |
426 | struct twl4030_bci *bci; | 426 | struct twl4030_bci *bci; |
427 | int ret; | 427 | int ret; |
428 | int reg; | 428 | u32 reg; |
429 | 429 | ||
430 | bci = kzalloc(sizeof(*bci), GFP_KERNEL); | 430 | bci = kzalloc(sizeof(*bci), GFP_KERNEL); |
431 | if (bci == NULL) | 431 | if (bci == NULL) |
@@ -486,7 +486,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /* Enable interrupts now. */ | 488 | /* Enable interrupts now. */ |
489 | reg = ~(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 | | 489 | reg = ~(u32)(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 | |
490 | TWL4030_TBATOR1 | TWL4030_BATSTS); | 490 | TWL4030_TBATOR1 | TWL4030_BATSTS); |
491 | ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg, | 491 | ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg, |
492 | TWL4030_INTERRUPTS_BCIIMR1A); | 492 | TWL4030_INTERRUPTS_BCIIMR1A); |
@@ -495,7 +495,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) | |||
495 | goto fail_unmask_interrupts; | 495 | goto fail_unmask_interrupts; |
496 | } | 496 | } |
497 | 497 | ||
498 | reg = ~(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV); | 498 | reg = ~(u32)(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV); |
499 | ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg, | 499 | ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg, |
500 | TWL4030_INTERRUPTS_BCIIMR2A); | 500 | TWL4030_INTERRUPTS_BCIIMR2A); |
501 | if (ret < 0) | 501 | if (ret < 0) |
@@ -572,7 +572,7 @@ static void __exit twl4030_bci_exit(void) | |||
572 | } | 572 | } |
573 | module_exit(twl4030_bci_exit); | 573 | module_exit(twl4030_bci_exit); |
574 | 574 | ||
575 | MODULE_AUTHOR("Gražydas Ignotas"); | 575 | MODULE_AUTHOR("Gražvydas Ignotas"); |
576 | MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver"); | 576 | MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver"); |
577 | MODULE_LICENSE("GPL"); | 577 | MODULE_LICENSE("GPL"); |
578 | MODULE_ALIAS("platform:twl4030_bci"); | 578 | MODULE_ALIAS("platform:twl4030_bci"); |