diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2012-01-19 16:42:48 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-01-24 16:47:46 -0500 |
commit | f9d41d7cb5a3a4fe9585d47e518d779d2aef8c94 (patch) | |
tree | 6146a2dbbfca01a09ecf32f5bf7b40e3add7e019 | |
parent | f54367f9de1b52000c008d3f68512f44cc392816 (diff) |
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinmux.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index a76a348321bb..0b22037965b9 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c | |||
@@ -152,8 +152,7 @@ static int pin_request(struct pinctrl_dev *pctldev, | |||
152 | status = 0; | 152 | status = 0; |
153 | 153 | ||
154 | if (status) | 154 | if (status) |
155 | dev_err(pctldev->dev, "->request on device %s failed " | 155 | dev_err(pctldev->dev, "->request on device %s failed for pin %d\n", |
156 | "for pin %d\n", | ||
157 | pctldev->desc->name, pin); | 156 | pctldev->desc->name, pin); |
158 | out_free_pin: | 157 | out_free_pin: |
159 | if (status) { | 158 | if (status) { |
@@ -355,21 +354,20 @@ int __init pinmux_register_mappings(struct pinmux_map const *maps, | |||
355 | /* First sanity check the new mapping */ | 354 | /* First sanity check the new mapping */ |
356 | for (i = 0; i < num_maps; i++) { | 355 | for (i = 0; i < num_maps; i++) { |
357 | if (!maps[i].name) { | 356 | if (!maps[i].name) { |
358 | pr_err("failed to register map %d: " | 357 | pr_err("failed to register map %d: no map name given\n", |
359 | "no map name given\n", i); | 358 | i); |
360 | return -EINVAL; | 359 | return -EINVAL; |
361 | } | 360 | } |
362 | 361 | ||
363 | if (!maps[i].ctrl_dev && !maps[i].ctrl_dev_name) { | 362 | if (!maps[i].ctrl_dev && !maps[i].ctrl_dev_name) { |
364 | pr_err("failed to register map %s (%d): " | 363 | pr_err("failed to register map %s (%d): no pin control device given\n", |
365 | "no pin control device given\n", | ||
366 | maps[i].name, i); | 364 | maps[i].name, i); |
367 | return -EINVAL; | 365 | return -EINVAL; |
368 | } | 366 | } |
369 | 367 | ||
370 | if (!maps[i].function) { | 368 | if (!maps[i].function) { |
371 | pr_err("failed to register map %s (%d): " | 369 | pr_err("failed to register map %s (%d): no function ID given\n", |
372 | "no function ID given\n", maps[i].name, i); | 370 | maps[i].name, i); |
373 | return -EINVAL; | 371 | return -EINVAL; |
374 | } | 372 | } |
375 | 373 | ||
@@ -442,8 +440,7 @@ static int acquire_pins(struct pinctrl_dev *pctldev, | |||
442 | ret = pin_request(pctldev, pins[i], func, NULL); | 440 | ret = pin_request(pctldev, pins[i], func, NULL); |
443 | if (ret) { | 441 | if (ret) { |
444 | dev_err(pctldev->dev, | 442 | dev_err(pctldev->dev, |
445 | "could not get pin %d for function %s " | 443 | "could not get pin %d for function %s on device %s - conflicting mux mappings?\n", |
446 | "on device %s - conflicting mux mappings?\n", | ||
447 | pins[i], func ? : "(undefined)", | 444 | pins[i], func ? : "(undefined)", |
448 | pinctrl_dev_get_name(pctldev)); | 445 | pinctrl_dev_get_name(pctldev)); |
449 | /* On error release all taken pins */ | 446 | /* On error release all taken pins */ |
@@ -473,8 +470,7 @@ static void release_pins(struct pinctrl_dev *pctldev, | |||
473 | ret = pctlops->get_group_pins(pctldev, group_selector, | 470 | ret = pctlops->get_group_pins(pctldev, group_selector, |
474 | &pins, &num_pins); | 471 | &pins, &num_pins); |
475 | if (ret) { | 472 | if (ret) { |
476 | dev_err(pctldev->dev, "could not get pins to release for " | 473 | dev_err(pctldev->dev, "could not get pins to release for group selector %d\n", |
477 | "group selector %d\n", | ||
478 | group_selector); | 474 | group_selector); |
479 | return; | 475 | return; |
480 | } | 476 | } |
@@ -526,8 +522,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev, | |||
526 | ret = pinctrl_get_group_selector(pctldev, groups[0]); | 522 | ret = pinctrl_get_group_selector(pctldev, groups[0]); |
527 | if (ret < 0) { | 523 | if (ret < 0) { |
528 | dev_err(pctldev->dev, | 524 | dev_err(pctldev->dev, |
529 | "function %s wants group %s but the pin " | 525 | "function %s wants group %s but the pin controller does not seem to have that group\n", |
530 | "controller does not seem to have that group\n", | ||
531 | pmxops->get_function_name(pctldev, func_selector), | 526 | pmxops->get_function_name(pctldev, func_selector), |
532 | groups[0]); | 527 | groups[0]); |
533 | return ret; | 528 | return ret; |
@@ -535,8 +530,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev, | |||
535 | 530 | ||
536 | if (num_groups > 1) | 531 | if (num_groups > 1) |
537 | dev_dbg(pctldev->dev, | 532 | dev_dbg(pctldev->dev, |
538 | "function %s support more than one group, " | 533 | "function %s support more than one group, default-selecting first group %s (%d)\n", |
539 | "default-selecting first group %s (%d)\n", | ||
540 | pmxops->get_function_name(pctldev, func_selector), | 534 | pmxops->get_function_name(pctldev, func_selector), |
541 | groups[0], | 535 | groups[0], |
542 | ret); | 536 | ret); |
@@ -628,10 +622,8 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev, | |||
628 | 622 | ||
629 | if (pmx->pctldev && pmx->pctldev != pctldev) { | 623 | if (pmx->pctldev && pmx->pctldev != pctldev) { |
630 | dev_err(pctldev->dev, | 624 | dev_err(pctldev->dev, |
631 | "different pin control devices given for device %s, " | 625 | "different pin control devices given for device %s, function %s\n", |
632 | "function %s\n", | 626 | devname, map->function); |
633 | devname, | ||
634 | map->function); | ||
635 | return -EINVAL; | 627 | return -EINVAL; |
636 | } | 628 | } |
637 | pmx->dev = dev; | 629 | pmx->dev = dev; |
@@ -695,7 +687,6 @@ static void pinmux_free_groups(struct pinmux *pmx) | |||
695 | */ | 687 | */ |
696 | struct pinmux *pinmux_get(struct device *dev, const char *name) | 688 | struct pinmux *pinmux_get(struct device *dev, const char *name) |
697 | { | 689 | { |
698 | |||
699 | struct pinmux_map const *map = NULL; | 690 | struct pinmux_map const *map = NULL; |
700 | struct pinctrl_dev *pctldev = NULL; | 691 | struct pinctrl_dev *pctldev = NULL; |
701 | const char *devname = NULL; | 692 | const char *devname = NULL; |
@@ -745,8 +736,7 @@ struct pinmux *pinmux_get(struct device *dev, const char *name) | |||
745 | else if (map->ctrl_dev_name) | 736 | else if (map->ctrl_dev_name) |
746 | devname = map->ctrl_dev_name; | 737 | devname = map->ctrl_dev_name; |
747 | 738 | ||
748 | pr_warning("could not find a pinctrl device for pinmux " | 739 | pr_warning("could not find a pinctrl device for pinmux function %s, fishy, they shall all have one\n", |
749 | "function %s, fishy, they shall all have one\n", | ||
750 | map->function); | 740 | map->function); |
751 | pr_warning("given pinctrl device name: %s", | 741 | pr_warning("given pinctrl device name: %s", |
752 | devname ? devname : "UNDEFINED"); | 742 | devname ? devname : "UNDEFINED"); |
@@ -932,8 +922,8 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev, | |||
932 | * without any problems, so then we can hog pinmuxes for | 922 | * without any problems, so then we can hog pinmuxes for |
933 | * all devices that just want a static pin mux at this point. | 923 | * all devices that just want a static pin mux at this point. |
934 | */ | 924 | */ |
935 | dev_err(pctldev->dev, "map %s wants to hog a non-system " | 925 | dev_err(pctldev->dev, "map %s wants to hog a non-system pinmux, this is not going to work\n", |
936 | "pinmux, this is not going to work\n", map->name); | 926 | map->name); |
937 | return -EINVAL; | 927 | return -EINVAL; |
938 | } | 928 | } |
939 | 929 | ||
@@ -1122,13 +1112,15 @@ static int pinmux_show(struct seq_file *s, void *what) | |||
1122 | 1112 | ||
1123 | seq_printf(s, "device: %s function: %s (%u),", | 1113 | seq_printf(s, "device: %s function: %s (%u),", |
1124 | pinctrl_dev_get_name(pmx->pctldev), | 1114 | pinctrl_dev_get_name(pmx->pctldev), |
1125 | pmxops->get_function_name(pctldev, pmx->func_selector), | 1115 | pmxops->get_function_name(pctldev, |
1116 | pmx->func_selector), | ||
1126 | pmx->func_selector); | 1117 | pmx->func_selector); |
1127 | 1118 | ||
1128 | seq_printf(s, " groups: ["); | 1119 | seq_printf(s, " groups: ["); |
1129 | list_for_each_entry(grp, &pmx->groups, node) { | 1120 | list_for_each_entry(grp, &pmx->groups, node) { |
1130 | seq_printf(s, " %s (%u)", | 1121 | seq_printf(s, " %s (%u)", |
1131 | pctlops->get_group_name(pctldev, grp->group_selector), | 1122 | pctlops->get_group_name(pctldev, |
1123 | grp->group_selector), | ||
1132 | grp->group_selector); | 1124 | grp->group_selector); |
1133 | } | 1125 | } |
1134 | seq_printf(s, " ]"); | 1126 | seq_printf(s, " ]"); |