diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/sh/pfc.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/sh/pfc.c')
-rw-r--r-- | drivers/sh/pfc.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/sh/pfc.c b/drivers/sh/pfc.c index cf0303acab8e..75934e3ea34e 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> |
@@ -559,10 +561,8 @@ static int sh_gpio_get_value(struct pinmux_info *gpioc, unsigned gpio) | |||
559 | struct pinmux_data_reg *dr = NULL; | 561 | struct pinmux_data_reg *dr = NULL; |
560 | int bit = 0; | 562 | int bit = 0; |
561 | 563 | ||
562 | if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0) { | 564 | if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0) |
563 | BUG(); | 565 | return -EINVAL; |
564 | return 0; | ||
565 | } | ||
566 | 566 | ||
567 | return gpio_read_reg(dr->reg, dr->reg_width, 1, bit); | 567 | return gpio_read_reg(dr->reg, dr->reg_width, 1, bit); |
568 | } | 568 | } |
@@ -581,7 +581,7 @@ int register_pinmux(struct pinmux_info *pip) | |||
581 | { | 581 | { |
582 | struct gpio_chip *chip = &pip->chip; | 582 | struct gpio_chip *chip = &pip->chip; |
583 | 583 | ||
584 | pr_info("sh pinmux: %s handling gpio %d -> %d\n", | 584 | pr_info("%s handling gpio %d -> %d\n", |
585 | pip->name, pip->first_gpio, pip->last_gpio); | 585 | pip->name, pip->first_gpio, pip->last_gpio); |
586 | 586 | ||
587 | setup_data_regs(pip); | 587 | setup_data_regs(pip); |
@@ -602,3 +602,10 @@ int register_pinmux(struct pinmux_info *pip) | |||
602 | 602 | ||
603 | return gpiochip_add(chip); | 603 | return gpiochip_add(chip); |
604 | } | 604 | } |
605 | |||
606 | int unregister_pinmux(struct pinmux_info *pip) | ||
607 | { | ||
608 | pr_info("%s deregistering\n", pip->name); | ||
609 | |||
610 | return gpiochip_remove(&pip->chip); | ||
611 | } | ||