aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/sh/pfc.c11
-rw-r--r--include/linux/sh_pfc.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/sh/pfc.c b/drivers/sh/pfc.c
index cf0303acab8e..dee581f6382c 100644
--- a/drivers/sh/pfc.c
+++ b/drivers/sh/pfc.c
@@ -7,6 +7,8 @@
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 */ 9 */
10#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
11
10#include <linux/errno.h> 12#include <linux/errno.h>
11#include <linux/kernel.h> 13#include <linux/kernel.h>
12#include <linux/list.h> 14#include <linux/list.h>
@@ -581,7 +583,7 @@ int register_pinmux(struct pinmux_info *pip)
581{ 583{
582 struct gpio_chip *chip = &pip->chip; 584 struct gpio_chip *chip = &pip->chip;
583 585
584 pr_info("sh pinmux: %s handling gpio %d -> %d\n", 586 pr_info("%s handling gpio %d -> %d\n",
585 pip->name, pip->first_gpio, pip->last_gpio); 587 pip->name, pip->first_gpio, pip->last_gpio);
586 588
587 setup_data_regs(pip); 589 setup_data_regs(pip);
@@ -602,3 +604,10 @@ int register_pinmux(struct pinmux_info *pip)
602 604
603 return gpiochip_add(chip); 605 return gpiochip_add(chip);
604} 606}
607
608int unregister_pinmux(struct pinmux_info *pip)
609{
610 pr_info("%s deregistering\n", pip->name);
611
612 return gpiochip_remove(&pip->chip);
613}
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h
index 07c08af9f8f6..30cae70874f4 100644
--- a/include/linux/sh_pfc.h
+++ b/include/linux/sh_pfc.h
@@ -92,5 +92,6 @@ struct pinmux_info {
92}; 92};
93 93
94int register_pinmux(struct pinmux_info *pip); 94int register_pinmux(struct pinmux_info *pip);
95int unregister_pinmux(struct pinmux_info *pip);
95 96
96#endif /* __SH_PFC_H */ 97#endif /* __SH_PFC_H */