From 6eb1a0c4d779aa3f001285aab23804990f97ba88 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Mon, 13 Oct 2008 11:35:22 +0800 Subject: [PATCH] --- yaml --- r: 113791 b: refs/heads/master c: e9fae189caae7c1cf306e30f5b67c6d226ed69cf h: refs/heads/master i: 113789: df4d5ceb17f967f0410d525ce4db5be21a8dc4bc 113787: 4a5d3ce612060f3ed619f398212ac9ec105e1040 113783: 960d036725035f55297512df5c56fccfed973b5f 113775: fe866619a63910fc6d2b00896b96f8105ac9f7c4 113759: 716537660117f80d4b1f1f07b61a2d91bfd8eb51 113727: f35b0bca8e447e8eac9e0de49846abc7f8210afd 113663: e6a0e50f2abe5324c8482d471a7fd66bbdab35a8 v: v3 --- [refs] | 2 +- trunk/arch/blackfin/kernel/bfin_gpio.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index f666790f8c23..fbbdbcc44e8a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 46aa04f9b678d1d6f3558429109326775ca87715 +refs/heads/master: e9fae189caae7c1cf306e30f5b67c6d226ed69cf diff --git a/trunk/arch/blackfin/kernel/bfin_gpio.c b/trunk/arch/blackfin/kernel/bfin_gpio.c index 12710ed180be..6e08f425bb44 100644 --- a/trunk/arch/blackfin/kernel/bfin_gpio.c +++ b/trunk/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