Commit f9d41d7c authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Linus Walleij

pinctrl: unbreak error messages

It's better to not line break error messages to allow easier grepping
for them even when the line gets >80 chars. Additionally some minor
reformating is done.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f54367f9
...@@ -152,8 +152,7 @@ static int pin_request(struct pinctrl_dev *pctldev, ...@@ -152,8 +152,7 @@ static int pin_request(struct pinctrl_dev *pctldev,
status = 0; status = 0;
if (status) if (status)
dev_err(pctldev->dev, "->request on device %s failed " dev_err(pctldev->dev, "->request on device %s failed for pin %d\n",
"for pin %d\n",
pctldev->desc->name, pin); pctldev->desc->name, pin);
out_free_pin: out_free_pin:
if (status) { if (status) {
...@@ -355,21 +354,20 @@ int __init pinmux_register_mappings(struct pinmux_map const *maps, ...@@ -355,21 +354,20 @@ int __init pinmux_register_mappings(struct pinmux_map const *maps,
/* First sanity check the new mapping */ /* First sanity check the new mapping */
for (i = 0; i < num_maps; i++) { for (i = 0; i < num_maps; i++) {
if (!maps[i].name) { if (!maps[i].name) {
pr_err("failed to register map %d: " pr_err("failed to register map %d: no map name given\n",
"no map name given\n", i); i);
return -EINVAL; return -EINVAL;
} }
if (!maps[i].ctrl_dev && !maps[i].ctrl_dev_name) { if (!maps[i].ctrl_dev && !maps[i].ctrl_dev_name) {
pr_err("failed to register map %s (%d): " pr_err("failed to register map %s (%d): no pin control device given\n",
"no pin control device given\n",
maps[i].name, i); maps[i].name, i);
return -EINVAL; return -EINVAL;
} }
if (!maps[i].function) { if (!maps[i].function) {
pr_err("failed to register map %s (%d): " pr_err("failed to register map %s (%d): no function ID given\n",
"no function ID given\n", maps[i].name, i); maps[i].name, i);
return -EINVAL; return -EINVAL;
} }
...@@ -442,8 +440,7 @@ static int acquire_pins(struct pinctrl_dev *pctldev, ...@@ -442,8 +440,7 @@ static int acquire_pins(struct pinctrl_dev *pctldev,
ret = pin_request(pctldev, pins[i], func, NULL); ret = pin_request(pctldev, pins[i], func, NULL);
if (ret) { if (ret) {
dev_err(pctldev->dev, dev_err(pctldev->dev,
"could not get pin %d for function %s " "could not get pin %d for function %s on device %s - conflicting mux mappings?\n",
"on device %s - conflicting mux mappings?\n",
pins[i], func ? : "(undefined)", pins[i], func ? : "(undefined)",
pinctrl_dev_get_name(pctldev)); pinctrl_dev_get_name(pctldev));
/* On error release all taken pins */ /* On error release all taken pins */
...@@ -473,8 +470,7 @@ static void release_pins(struct pinctrl_dev *pctldev, ...@@ -473,8 +470,7 @@ static void release_pins(struct pinctrl_dev *pctldev,
ret = pctlops->get_group_pins(pctldev, group_selector, ret = pctlops->get_group_pins(pctldev, group_selector,
&pins, &num_pins); &pins, &num_pins);
if (ret) { if (ret) {
dev_err(pctldev->dev, "could not get pins to release for " dev_err(pctldev->dev, "could not get pins to release for group selector %d\n",
"group selector %d\n",
group_selector); group_selector);
return; return;
} }
...@@ -526,8 +522,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev, ...@@ -526,8 +522,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
ret = pinctrl_get_group_selector(pctldev, groups[0]); ret = pinctrl_get_group_selector(pctldev, groups[0]);
if (ret < 0) { if (ret < 0) {
dev_err(pctldev->dev, dev_err(pctldev->dev,
"function %s wants group %s but the pin " "function %s wants group %s but the pin controller does not seem to have that group\n",
"controller does not seem to have that group\n",
pmxops->get_function_name(pctldev, func_selector), pmxops->get_function_name(pctldev, func_selector),
groups[0]); groups[0]);
return ret; return ret;
...@@ -535,8 +530,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev, ...@@ -535,8 +530,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
if (num_groups > 1) if (num_groups > 1)
dev_dbg(pctldev->dev, dev_dbg(pctldev->dev,
"function %s support more than one group, " "function %s support more than one group, default-selecting first group %s (%d)\n",
"default-selecting first group %s (%d)\n",
pmxops->get_function_name(pctldev, func_selector), pmxops->get_function_name(pctldev, func_selector),
groups[0], groups[0],
ret); ret);
...@@ -628,10 +622,8 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev, ...@@ -628,10 +622,8 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev,
if (pmx->pctldev && pmx->pctldev != pctldev) { if (pmx->pctldev && pmx->pctldev != pctldev) {
dev_err(pctldev->dev, dev_err(pctldev->dev,
"different pin control devices given for device %s, " "different pin control devices given for device %s, function %s\n",
"function %s\n", devname, map->function);
devname,
map->function);
return -EINVAL; return -EINVAL;
} }
pmx->dev = dev; pmx->dev = dev;
...@@ -695,7 +687,6 @@ static void pinmux_free_groups(struct pinmux *pmx) ...@@ -695,7 +687,6 @@ static void pinmux_free_groups(struct pinmux *pmx)
*/ */
struct pinmux *pinmux_get(struct device *dev, const char *name) struct pinmux *pinmux_get(struct device *dev, const char *name)
{ {
struct pinmux_map const *map = NULL; struct pinmux_map const *map = NULL;
struct pinctrl_dev *pctldev = NULL; struct pinctrl_dev *pctldev = NULL;
const char *devname = NULL; const char *devname = NULL;
...@@ -745,8 +736,7 @@ struct pinmux *pinmux_get(struct device *dev, const char *name) ...@@ -745,8 +736,7 @@ struct pinmux *pinmux_get(struct device *dev, const char *name)
else if (map->ctrl_dev_name) else if (map->ctrl_dev_name)
devname = map->ctrl_dev_name; devname = map->ctrl_dev_name;
pr_warning("could not find a pinctrl device for pinmux " pr_warning("could not find a pinctrl device for pinmux function %s, fishy, they shall all have one\n",
"function %s, fishy, they shall all have one\n",
map->function); map->function);
pr_warning("given pinctrl device name: %s", pr_warning("given pinctrl device name: %s",
devname ? devname : "UNDEFINED"); devname ? devname : "UNDEFINED");
...@@ -932,8 +922,8 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev, ...@@ -932,8 +922,8 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
* without any problems, so then we can hog pinmuxes for * without any problems, so then we can hog pinmuxes for
* all devices that just want a static pin mux at this point. * all devices that just want a static pin mux at this point.
*/ */
dev_err(pctldev->dev, "map %s wants to hog a non-system " dev_err(pctldev->dev, "map %s wants to hog a non-system pinmux, this is not going to work\n",
"pinmux, this is not going to work\n", map->name); map->name);
return -EINVAL; return -EINVAL;
} }
...@@ -1122,13 +1112,15 @@ static int pinmux_show(struct seq_file *s, void *what) ...@@ -1122,13 +1112,15 @@ static int pinmux_show(struct seq_file *s, void *what)
seq_printf(s, "device: %s function: %s (%u),", seq_printf(s, "device: %s function: %s (%u),",
pinctrl_dev_get_name(pmx->pctldev), pinctrl_dev_get_name(pmx->pctldev),
pmxops->get_function_name(pctldev, pmx->func_selector), pmxops->get_function_name(pctldev,
pmx->func_selector),
pmx->func_selector); pmx->func_selector);
seq_printf(s, " groups: ["); seq_printf(s, " groups: [");
list_for_each_entry(grp, &pmx->groups, node) { list_for_each_entry(grp, &pmx->groups, node) {
seq_printf(s, " %s (%u)", seq_printf(s, " %s (%u)",
pctlops->get_group_name(pctldev, grp->group_selector), pctlops->get_group_name(pctldev,
grp->group_selector),
grp->group_selector); grp->group_selector);
} }
seq_printf(s, " ]"); seq_printf(s, " ]");
......
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