aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-12-09 18:59:05 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-01-03 03:10:06 -0500
commit51cd24ee625c348654114032499914d0311e5832 (patch)
tree7483fbdc4db119f9a8f013035005f374e729ffd0 /drivers/pinctrl
parent528b78306ecf82af06c4862aa5518643fe20a440 (diff)
pinctrl: don't create a device for each pin controller
Pin controllers should already be instantiated as a device, so there's no need for the pinctrl core to create a new struct device for each controller. This allows the controller's real name to be used in the mux mapping table, rather than e.g. "pinctrl.0", "pinctrl.1", etc. This necessitates removal of the PINMUX_MAP_PRIMARY*() macros, since their sole purpose was to hard-code the .ctrl_dev_name field to be "pinctrl.0". Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/core.c42
-rw-r--r--drivers/pinctrl/core.h2
-rw-r--r--drivers/pinctrl/pinconf.c12
-rw-r--r--drivers/pinctrl/pinmux.c46
4 files changed, 41 insertions, 61 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 034b1ad38b32..160fb5aae591 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -34,12 +34,6 @@
34static DEFINE_MUTEX(pinctrldev_list_mutex); 34static DEFINE_MUTEX(pinctrldev_list_mutex);
35static LIST_HEAD(pinctrldev_list); 35static LIST_HEAD(pinctrldev_list);
36 36
37static void pinctrl_dev_release(struct device *dev)
38{
39 struct pinctrl_dev *pctldev = dev_get_drvdata(dev);
40 kfree(pctldev);
41}
42
43const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev) 37const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev)
44{ 38{
45 /* We're not allowed to register devices without name */ 39 /* We're not allowed to register devices without name */
@@ -71,14 +65,14 @@ struct pinctrl_dev *get_pinctrl_dev_from_dev(struct device *dev,
71 65
72 mutex_lock(&pinctrldev_list_mutex); 66 mutex_lock(&pinctrldev_list_mutex);
73 list_for_each_entry(pctldev, &pinctrldev_list, node) { 67 list_for_each_entry(pctldev, &pinctrldev_list, node) {
74 if (dev && &pctldev->dev == dev) { 68 if (dev && pctldev->dev == dev) {
75 /* Matched on device pointer */ 69 /* Matched on device pointer */
76 found = true; 70 found = true;
77 break; 71 break;
78 } 72 }
79 73
80 if (devname && 74 if (devname &&
81 !strcmp(dev_name(&pctldev->dev), devname)) { 75 !strcmp(dev_name(pctldev->dev), devname)) {
82 /* Matched on device name */ 76 /* Matched on device name */
83 found = true; 77 found = true;
84 break; 78 break;
@@ -325,7 +319,7 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
325 const char *gname = pctlops->get_group_name(pctldev, 319 const char *gname = pctlops->get_group_name(pctldev,
326 group_selector); 320 group_selector);
327 if (!strcmp(gname, pin_group)) { 321 if (!strcmp(gname, pin_group)) {
328 dev_dbg(&pctldev->dev, 322 dev_dbg(pctldev->dev,
329 "found group selector %u for %s\n", 323 "found group selector %u for %s\n",
330 group_selector, 324 group_selector,
331 pin_group); 325 pin_group);
@@ -335,7 +329,7 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
335 group_selector++; 329 group_selector++;
336 } 330 }
337 331
338 dev_err(&pctldev->dev, "does not have pin group %s\n", 332 dev_err(pctldev->dev, "does not have pin group %s\n",
339 pin_group); 333 pin_group);
340 334
341 return -EINVAL; 335 return -EINVAL;
@@ -508,11 +502,11 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev)
508{ 502{
509 static struct dentry *device_root; 503 static struct dentry *device_root;
510 504
511 device_root = debugfs_create_dir(dev_name(&pctldev->dev), 505 device_root = debugfs_create_dir(dev_name(pctldev->dev),
512 debugfs_root); 506 debugfs_root);
513 if (IS_ERR(device_root) || !device_root) { 507 if (IS_ERR(device_root) || !device_root) {
514 pr_warn("failed to create debugfs directory for %s\n", 508 pr_warn("failed to create debugfs directory for %s\n",
515 dev_name(&pctldev->dev)); 509 dev_name(pctldev->dev));
516 return; 510 return;
517 } 511 }
518 debugfs_create_file("pins", S_IFREG | S_IRUGO, 512 debugfs_create_file("pins", S_IFREG | S_IRUGO,
@@ -560,7 +554,6 @@ static void pinctrl_init_debugfs(void)
560struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc, 554struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
561 struct device *dev, void *driver_data) 555 struct device *dev, void *driver_data)
562{ 556{
563 static atomic_t pinmux_no = ATOMIC_INIT(0);
564 struct pinctrl_dev *pctldev; 557 struct pinctrl_dev *pctldev;
565 int ret; 558 int ret;
566 559
@@ -601,18 +594,7 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
601 spin_lock_init(&pctldev->pin_desc_tree_lock); 594 spin_lock_init(&pctldev->pin_desc_tree_lock);
602 INIT_LIST_HEAD(&pctldev->gpio_ranges); 595 INIT_LIST_HEAD(&pctldev->gpio_ranges);
603 mutex_init(&pctldev->gpio_ranges_lock); 596 mutex_init(&pctldev->gpio_ranges_lock);
604 597 pctldev->dev = dev;
605 /* Register device */
606 pctldev->dev.parent = dev;
607 dev_set_name(&pctldev->dev, "pinctrl.%d",
608 atomic_inc_return(&pinmux_no) - 1);
609 pctldev->dev.release = pinctrl_dev_release;
610 ret = device_register(&pctldev->dev);
611 if (ret != 0) {
612 pr_err("error in device registration\n");
613 goto out_reg_dev_err;
614 }
615 dev_set_drvdata(&pctldev->dev, pctldev);
616 598
617 /* Register all the pins */ 599 /* Register all the pins */
618 pr_debug("try to register %d pins on %s...\n", 600 pr_debug("try to register %d pins on %s...\n",
@@ -622,7 +604,7 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
622 pr_err("error during pin registration\n"); 604 pr_err("error during pin registration\n");
623 pinctrl_free_pindescs(pctldev, pctldesc->pins, 605 pinctrl_free_pindescs(pctldev, pctldesc->pins,
624 pctldesc->npins); 606 pctldesc->npins);
625 goto out_reg_pins_err; 607 goto out_err;
626 } 608 }
627 609
628 pinctrl_init_device_debugfs(pctldev); 610 pinctrl_init_device_debugfs(pctldev);
@@ -632,10 +614,8 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
632 pinmux_hog_maps(pctldev); 614 pinmux_hog_maps(pctldev);
633 return pctldev; 615 return pctldev;
634 616
635out_reg_pins_err: 617out_err:
636 device_del(&pctldev->dev); 618 kfree(pctldev);
637out_reg_dev_err:
638 put_device(&pctldev->dev);
639 return NULL; 619 return NULL;
640} 620}
641EXPORT_SYMBOL_GPL(pinctrl_register); 621EXPORT_SYMBOL_GPL(pinctrl_register);
@@ -659,7 +639,7 @@ void pinctrl_unregister(struct pinctrl_dev *pctldev)
659 /* Destroy descriptor tree */ 639 /* Destroy descriptor tree */
660 pinctrl_free_pindescs(pctldev, pctldev->desc->pins, 640 pinctrl_free_pindescs(pctldev, pctldev->desc->pins,
661 pctldev->desc->npins); 641 pctldev->desc->npins);
662 device_unregister(&pctldev->dev); 642 kfree(pctldev);
663} 643}
664EXPORT_SYMBOL_GPL(pinctrl_unregister); 644EXPORT_SYMBOL_GPL(pinctrl_unregister);
665 645
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 3f5b911acf18..5375582566a5 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -38,7 +38,7 @@ struct pinctrl_dev {
38 spinlock_t pin_desc_tree_lock; 38 spinlock_t pin_desc_tree_lock;
39 struct list_head gpio_ranges; 39 struct list_head gpio_ranges;
40 struct mutex gpio_ranges_lock; 40 struct mutex gpio_ranges_lock;
41 struct device dev; 41 struct device *dev;
42 struct module *owner; 42 struct module *owner;
43 void *driver_data; 43 void *driver_data;
44#ifdef CONFIG_PINMUX 44#ifdef CONFIG_PINMUX
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 9195eefe258a..124762b57024 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -29,7 +29,7 @@ int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
29 const struct pinconf_ops *ops = pctldev->desc->confops; 29 const struct pinconf_ops *ops = pctldev->desc->confops;
30 30
31 if (!ops || !ops->pin_config_get) { 31 if (!ops || !ops->pin_config_get) {
32 dev_err(&pctldev->dev, "cannot get pin configuration, missing " 32 dev_err(pctldev->dev, "cannot get pin configuration, missing "
33 "pin_config_get() function in driver\n"); 33 "pin_config_get() function in driver\n");
34 return -EINVAL; 34 return -EINVAL;
35 } 35 }
@@ -65,14 +65,14 @@ int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
65 int ret; 65 int ret;
66 66
67 if (!ops || !ops->pin_config_set) { 67 if (!ops || !ops->pin_config_set) {
68 dev_err(&pctldev->dev, "cannot configure pin, missing " 68 dev_err(pctldev->dev, "cannot configure pin, missing "
69 "config function in driver\n"); 69 "config function in driver\n");
70 return -EINVAL; 70 return -EINVAL;
71 } 71 }
72 72
73 ret = ops->pin_config_set(pctldev, pin, config); 73 ret = ops->pin_config_set(pctldev, pin, config);
74 if (ret) { 74 if (ret) {
75 dev_err(&pctldev->dev, 75 dev_err(pctldev->dev,
76 "unable to set pin configuration on pin %d\n", pin); 76 "unable to set pin configuration on pin %d\n", pin);
77 return ret; 77 return ret;
78 } 78 }
@@ -108,7 +108,7 @@ int pin_config_group_get(struct pinctrl_dev *pctldev, const char *pin_group,
108 int selector; 108 int selector;
109 109
110 if (!ops || !ops->pin_config_group_get) { 110 if (!ops || !ops->pin_config_group_get) {
111 dev_err(&pctldev->dev, "cannot get configuration for pin " 111 dev_err(pctldev->dev, "cannot get configuration for pin "
112 "group, missing group config get function in " 112 "group, missing group config get function in "
113 "driver\n"); 113 "driver\n");
114 return -EINVAL; 114 return -EINVAL;
@@ -135,7 +135,7 @@ int pin_config_group_set(struct pinctrl_dev *pctldev, const char *pin_group,
135 int i; 135 int i;
136 136
137 if (!ops || (!ops->pin_config_group_set && !ops->pin_config_set)) { 137 if (!ops || (!ops->pin_config_group_set && !ops->pin_config_set)) {
138 dev_err(&pctldev->dev, "cannot configure pin group, missing " 138 dev_err(pctldev->dev, "cannot configure pin group, missing "
139 "config function in driver\n"); 139 "config function in driver\n");
140 return -EINVAL; 140 return -EINVAL;
141 } 141 }
@@ -146,7 +146,7 @@ int pin_config_group_set(struct pinctrl_dev *pctldev, const char *pin_group,
146 146
147 ret = pctlops->get_group_pins(pctldev, selector, &pins, &num_pins); 147 ret = pctlops->get_group_pins(pctldev, selector, &pins, &num_pins);
148 if (ret) { 148 if (ret) {
149 dev_err(&pctldev->dev, "cannot configure pin group, error " 149 dev_err(pctldev->dev, "cannot configure pin group, error "
150 "getting pins\n"); 150 "getting pins\n");
151 return ret; 151 return ret;
152 } 152 }
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index a11681b4bd91..3bcc64137ddc 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -106,24 +106,24 @@ static int pin_request(struct pinctrl_dev *pctldev,
106 const struct pinmux_ops *ops = pctldev->desc->pmxops; 106 const struct pinmux_ops *ops = pctldev->desc->pmxops;
107 int status = -EINVAL; 107 int status = -EINVAL;
108 108
109 dev_dbg(&pctldev->dev, "request pin %d for %s\n", pin, function); 109 dev_dbg(pctldev->dev, "request pin %d for %s\n", pin, function);
110 110
111 desc = pin_desc_get(pctldev, pin); 111 desc = pin_desc_get(pctldev, pin);
112 if (desc == NULL) { 112 if (desc == NULL) {
113 dev_err(&pctldev->dev, 113 dev_err(pctldev->dev,
114 "pin is not registered so it cannot be requested\n"); 114 "pin is not registered so it cannot be requested\n");
115 goto out; 115 goto out;
116 } 116 }
117 117
118 if (!function) { 118 if (!function) {
119 dev_err(&pctldev->dev, "no function name given\n"); 119 dev_err(pctldev->dev, "no function name given\n");
120 return -EINVAL; 120 return -EINVAL;
121 } 121 }
122 122
123 spin_lock(&desc->lock); 123 spin_lock(&desc->lock);
124 if (desc->mux_function) { 124 if (desc->mux_function) {
125 spin_unlock(&desc->lock); 125 spin_unlock(&desc->lock);
126 dev_err(&pctldev->dev, 126 dev_err(pctldev->dev,
127 "pin already requested\n"); 127 "pin already requested\n");
128 goto out; 128 goto out;
129 } 129 }
@@ -132,7 +132,7 @@ static int pin_request(struct pinctrl_dev *pctldev,
132 132
133 /* Let each pin increase references to this module */ 133 /* Let each pin increase references to this module */
134 if (!try_module_get(pctldev->owner)) { 134 if (!try_module_get(pctldev->owner)) {
135 dev_err(&pctldev->dev, 135 dev_err(pctldev->dev,
136 "could not increase module refcount for pin %d\n", 136 "could not increase module refcount for pin %d\n",
137 pin); 137 pin);
138 status = -EINVAL; 138 status = -EINVAL;
@@ -152,7 +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 "
156 "for pin %d\n", 156 "for pin %d\n",
157 pctldev->desc->name, pin); 157 pctldev->desc->name, pin);
158out_free_pin: 158out_free_pin:
@@ -163,7 +163,7 @@ out_free_pin:
163 } 163 }
164out: 164out:
165 if (status) 165 if (status)
166 dev_err(&pctldev->dev, "pin-%d (%s) status %d\n", 166 dev_err(pctldev->dev, "pin-%d (%s) status %d\n",
167 pin, function ? : "?", status); 167 pin, function ? : "?", status);
168 168
169 return status; 169 return status;
@@ -189,7 +189,7 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin,
189 189
190 desc = pin_desc_get(pctldev, pin); 190 desc = pin_desc_get(pctldev, pin);
191 if (desc == NULL) { 191 if (desc == NULL) {
192 dev_err(&pctldev->dev, 192 dev_err(pctldev->dev,
193 "pin is not registered so it cannot be freed\n"); 193 "pin is not registered so it cannot be freed\n");
194 return NULL; 194 return NULL;
195 } 195 }
@@ -434,14 +434,14 @@ static int acquire_pins(struct pinctrl_dev *pctldev,
434 if (ret) 434 if (ret)
435 return ret; 435 return ret;
436 436
437 dev_dbg(&pctldev->dev, "requesting the %u pins from group %u\n", 437 dev_dbg(pctldev->dev, "requesting the %u pins from group %u\n",
438 num_pins, group_selector); 438 num_pins, group_selector);
439 439
440 /* Try to allocate all pins in this group, one by one */ 440 /* Try to allocate all pins in this group, one by one */
441 for (i = 0; i < num_pins; i++) { 441 for (i = 0; i < num_pins; i++) {
442 ret = pin_request(pctldev, pins[i], func, NULL); 442 ret = pin_request(pctldev, pins[i], func, NULL);
443 if (ret) { 443 if (ret) {
444 dev_err(&pctldev->dev, 444 dev_err(pctldev->dev,
445 "could not get pin %d for function %s " 445 "could not get pin %d for function %s "
446 "on device %s - conflicting mux mappings?\n", 446 "on device %s - conflicting mux mappings?\n",
447 pins[i], func ? : "(undefined)", 447 pins[i], func ? : "(undefined)",
@@ -473,7 +473,7 @@ static void release_pins(struct pinctrl_dev *pctldev,
473 ret = pctlops->get_group_pins(pctldev, group_selector, 473 ret = pctlops->get_group_pins(pctldev, group_selector,
474 &pins, &num_pins); 474 &pins, &num_pins);
475 if (ret) { 475 if (ret) {
476 dev_err(&pctldev->dev, "could not get pins to release for " 476 dev_err(pctldev->dev, "could not get pins to release for "
477 "group selector %d\n", 477 "group selector %d\n",
478 group_selector); 478 group_selector);
479 return; 479 return;
@@ -525,7 +525,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
525 return -EINVAL; 525 return -EINVAL;
526 ret = pinctrl_get_group_selector(pctldev, groups[0]); 526 ret = pinctrl_get_group_selector(pctldev, groups[0]);
527 if (ret < 0) { 527 if (ret < 0) {
528 dev_err(&pctldev->dev, 528 dev_err(pctldev->dev,
529 "function %s wants group %s but the pin " 529 "function %s wants group %s but the pin "
530 "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), 531 pmxops->get_function_name(pctldev, func_selector),
@@ -534,7 +534,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
534 } 534 }
535 535
536 if (num_groups > 1) 536 if (num_groups > 1)
537 dev_dbg(&pctldev->dev, 537 dev_dbg(pctldev->dev,
538 "function %s support more than one group, " 538 "function %s support more than one group, "
539 "default-selecting first group %s (%d)\n", 539 "default-selecting first group %s (%d)\n",
540 pmxops->get_function_name(pctldev, func_selector), 540 pmxops->get_function_name(pctldev, func_selector),
@@ -544,13 +544,13 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
544 return ret; 544 return ret;
545 } 545 }
546 546
547 dev_dbg(&pctldev->dev, 547 dev_dbg(pctldev->dev,
548 "check if we have pin group %s on controller %s\n", 548 "check if we have pin group %s on controller %s\n",
549 pin_group, pinctrl_dev_get_name(pctldev)); 549 pin_group, pinctrl_dev_get_name(pctldev));
550 550
551 ret = pinctrl_get_group_selector(pctldev, pin_group); 551 ret = pinctrl_get_group_selector(pctldev, pin_group);
552 if (ret < 0) { 552 if (ret < 0) {
553 dev_dbg(&pctldev->dev, 553 dev_dbg(pctldev->dev,
554 "%s does not support pin group %s with function %s\n", 554 "%s does not support pin group %s with function %s\n",
555 pinctrl_dev_get_name(pctldev), 555 pinctrl_dev_get_name(pctldev),
556 pin_group, 556 pin_group,
@@ -627,7 +627,7 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev,
627 */ 627 */
628 628
629 if (pmx->pctldev && pmx->pctldev != pctldev) { 629 if (pmx->pctldev && pmx->pctldev != pctldev) {
630 dev_err(&pctldev->dev, 630 dev_err(pctldev->dev,
631 "different pin control devices given for device %s, " 631 "different pin control devices given for device %s, "
632 "function %s\n", 632 "function %s\n",
633 devname, 633 devname,
@@ -650,7 +650,7 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev,
650 */ 650 */
651 if (pmx->func_selector != UINT_MAX && 651 if (pmx->func_selector != UINT_MAX &&
652 pmx->func_selector != func_selector) { 652 pmx->func_selector != func_selector) {
653 dev_err(&pctldev->dev, 653 dev_err(pctldev->dev,
654 "dual function defines in the map for device %s\n", 654 "dual function defines in the map for device %s\n",
655 devname); 655 devname);
656 return -EINVAL; 656 return -EINVAL;
@@ -756,7 +756,7 @@ struct pinmux *pinmux_get(struct device *dev, const char *name)
756 } 756 }
757 757
758 pr_debug("in map, found pctldev %s to handle function %s", 758 pr_debug("in map, found pctldev %s to handle function %s",
759 dev_name(&pctldev->dev), map->function); 759 dev_name(pctldev->dev), map->function);
760 760
761 761
762 /* 762 /*
@@ -932,7 +932,7 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
932 * without any problems, so then we can hog pinmuxes for 932 * without any problems, so then we can hog pinmuxes for
933 * all devices that just want a static pin mux at this point. 933 * all devices that just want a static pin mux at this point.
934 */ 934 */
935 dev_err(&pctldev->dev, "map %s wants to hog a non-system " 935 dev_err(pctldev->dev, "map %s wants to hog a non-system "
936 "pinmux, this is not going to work\n", map->name); 936 "pinmux, this is not going to work\n", map->name);
937 return -EINVAL; 937 return -EINVAL;
938 } 938 }
@@ -944,7 +944,7 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
944 pmx = pinmux_get(NULL, map->name); 944 pmx = pinmux_get(NULL, map->name);
945 if (IS_ERR(pmx)) { 945 if (IS_ERR(pmx)) {
946 kfree(hog); 946 kfree(hog);
947 dev_err(&pctldev->dev, 947 dev_err(pctldev->dev,
948 "could not get the %s pinmux mapping for hogging\n", 948 "could not get the %s pinmux mapping for hogging\n",
949 map->name); 949 map->name);
950 return PTR_ERR(pmx); 950 return PTR_ERR(pmx);
@@ -954,7 +954,7 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
954 if (ret) { 954 if (ret) {
955 pinmux_put(pmx); 955 pinmux_put(pmx);
956 kfree(hog); 956 kfree(hog);
957 dev_err(&pctldev->dev, 957 dev_err(pctldev->dev,
958 "could not enable the %s pinmux mapping for hogging\n", 958 "could not enable the %s pinmux mapping for hogging\n",
959 map->name); 959 map->name);
960 return ret; 960 return ret;
@@ -963,7 +963,7 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
963 hog->map = map; 963 hog->map = map;
964 hog->pmx = pmx; 964 hog->pmx = pmx;
965 965
966 dev_info(&pctldev->dev, "hogged map %s, function %s\n", map->name, 966 dev_info(pctldev->dev, "hogged map %s, function %s\n", map->name,
967 map->function); 967 map->function);
968 mutex_lock(&pctldev->pinmux_hogs_lock); 968 mutex_lock(&pctldev->pinmux_hogs_lock);
969 list_add(&hog->node, &pctldev->pinmux_hogs); 969 list_add(&hog->node, &pctldev->pinmux_hogs);
@@ -982,7 +982,7 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
982 */ 982 */
983int pinmux_hog_maps(struct pinctrl_dev *pctldev) 983int pinmux_hog_maps(struct pinctrl_dev *pctldev)
984{ 984{
985 struct device *dev = &pctldev->dev; 985 struct device *dev = pctldev->dev;
986 const char *devname = dev_name(dev); 986 const char *devname = dev_name(dev);
987 int ret; 987 int ret;
988 int i; 988 int i;