aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2015-10-28 07:11:05 -0400
committerLee Jones <lee.jones@linaro.org>2016-01-14 03:43:56 -0500
commit63b4fd7502790b16257396cc0270fa698bdec2b1 (patch)
tree0e2abb96d01ff449af80231863d4ae4a8a357521 /drivers/mfd
parentdf36442cfe2689e1b26c9633c17a28a9fe4e91ec (diff)
mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues
WARNING: char * array declaration might be better as static const + static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"}; WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... + printk(KERN_INFO WARNING: quoted string split across lines + "Charger \"%s\" is connected with known battery." + " Rebooting.\n", WARNING: quoted string split across lines + "unable to set sysClkReq%dRfClkBuf: " + "%d\n", j + 1, ret); total: 0 errors, 4 warnings, 199 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ab8500-sysctrl.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 0d1825696153..b9f0010309f9 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -27,7 +27,7 @@ static void ab8500_power_off(void)
27{ 27{
28 sigset_t old; 28 sigset_t old;
29 sigset_t all; 29 sigset_t all;
30 static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"}; 30 static const char * const pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};
31 int i; 31 int i;
32 bool charger_present = false; 32 bool charger_present = false;
33 union power_supply_propval val; 33 union power_supply_propval val;
@@ -68,10 +68,9 @@ static void ab8500_power_off(void)
68 ret = power_supply_get_property(psy, 68 ret = power_supply_get_property(psy,
69 POWER_SUPPLY_PROP_TECHNOLOGY, &val); 69 POWER_SUPPLY_PROP_TECHNOLOGY, &val);
70 if (!ret && val.intval != POWER_SUPPLY_TECHNOLOGY_UNKNOWN) { 70 if (!ret && val.intval != POWER_SUPPLY_TECHNOLOGY_UNKNOWN) {
71 printk(KERN_INFO 71 pr_info("Charger '%s' is connected with known battery",
72 "Charger \"%s\" is connected with known battery." 72 pss[i]);
73 " Rebooting.\n", 73 pr_info(" - Rebooting.\n");
74 pss[i]);
75 machine_restart("charging"); 74 machine_restart("charging");
76 } 75 }
77 power_supply_put(psy); 76 power_supply_put(psy);
@@ -161,8 +160,8 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
161 pdata->initial_req_buf_config[j]); 160 pdata->initial_req_buf_config[j]);
162 if (ret < 0) { 161 if (ret < 0) {
163 dev_err(&pdev->dev, 162 dev_err(&pdev->dev,
164 "unable to set sysClkReq%dRfClkBuf: " 163 "Can't set sysClkReq%dRfClkBuf: %d\n",
165 "%d\n", j + 1, ret); 164 j + 1, ret);
166 } 165 }
167 } 166 }
168 } 167 }