Commit 63b4fd75 authored by Lee Jones's avatar Lee Jones

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: default avatarLee Jones <lee.jones@linaro.org>
parent df36442c
...@@ -27,7 +27,7 @@ static void ab8500_power_off(void) ...@@ -27,7 +27,7 @@ static void ab8500_power_off(void)
{ {
sigset_t old; sigset_t old;
sigset_t all; sigset_t all;
static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"}; static const char * const pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};
int i; int i;
bool charger_present = false; bool charger_present = false;
union power_supply_propval val; union power_supply_propval val;
...@@ -68,10 +68,9 @@ static void ab8500_power_off(void) ...@@ -68,10 +68,9 @@ static void ab8500_power_off(void)
ret = power_supply_get_property(psy, ret = power_supply_get_property(psy,
POWER_SUPPLY_PROP_TECHNOLOGY, &val); POWER_SUPPLY_PROP_TECHNOLOGY, &val);
if (!ret && val.intval != POWER_SUPPLY_TECHNOLOGY_UNKNOWN) { if (!ret && val.intval != POWER_SUPPLY_TECHNOLOGY_UNKNOWN) {
printk(KERN_INFO pr_info("Charger '%s' is connected with known battery",
"Charger \"%s\" is connected with known battery." pss[i]);
" Rebooting.\n", pr_info(" - Rebooting.\n");
pss[i]);
machine_restart("charging"); machine_restart("charging");
} }
power_supply_put(psy); power_supply_put(psy);
...@@ -161,8 +160,8 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev) ...@@ -161,8 +160,8 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
pdata->initial_req_buf_config[j]); pdata->initial_req_buf_config[j]);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"unable to set sysClkReq%dRfClkBuf: " "Can't set sysClkReq%dRfClkBuf: %d\n",
"%d\n", j + 1, ret); j + 1, ret);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment