diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-10-13 05:35:22 +0200 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-13 05:35:22 +0200 |
commit | e9fae189caae7c1cf306e30f5b67c6d226ed69cf (patch) | |
tree | 059ece3216ac9c01b943e41b059f26c6ff577685 /arch/blackfin | |
parent | Blackfin arch: AD7879 Touchscreen driver (diff) | |
download | linux-e9fae189caae7c1cf306e30f5b67c6d226ed69cf.tar.xz linux-e9fae189caae7c1cf306e30f5b67c6d226ed69cf.zip |
Blackfin arch: Fix bogus str_ident check in gpio code
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index 12710ed180be..6e08f425bb44 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -238,7 +238,7 @@ static void gpio_error(unsigned gpio) static void set_label(unsigned short ident, const char *label) { - if (label && str_ident) { + if (label) { strncpy(str_ident[ident].name, label, RESOURCE_LABEL_SIZE); str_ident[ident].name[RESOURCE_LABEL_SIZE - 1] = 0; @@ -247,9 +247,6 @@ static void set_label(unsigned short ident, const char *label) static char *get_label(unsigned short ident) { - if (!str_ident) - return "UNKNOWN"; - return (*str_ident[ident].name ? str_ident[ident].name : "UNKNOWN"); } @@ -260,7 +257,7 @@ static int cmp_label(unsigned short ident, const char *label) printk(KERN_ERR "Please provide none-null label\n"); } - if (label && str_ident) + if (label) return strncmp(str_ident[ident].name, label, strlen(label)); else |