From: Ben Dooks Date: Wed, 26 May 2010 21:42:21 +0000 (-0700) Subject: gpiolib: make gpiochip_add() show a better error message X-Git-Tag: v2.6.35-rc1~215 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=796a8e423ac8afe9e98ad96e668f50142bdd7825;p=net-next-2.6.git gpiolib: make gpiochip_add() show a better error message The current message, 'not registered' is confusing as it implies it was not registered with something, whereas printing 'failed to register' implies it was the gpiochip_add() call that did not work correctly. Signed-off-by: Ben Dooks Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 05019c15a86..362a613d266 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1106,7 +1106,7 @@ unlock: fail: /* failures here can mean systems won't boot... */ if (status) - pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", + pr_err("gpiochip_add: gpios %d..%d (%s) failed to register\n", chip->base, chip->base + chip->ngpio - 1, chip->label ? : "generic"); return status;