gpiolib: make gpiochip_add() show a better error message
authorBen Dooks <[email protected]>
Wed, 26 May 2010 21:42:21 +0000 (14:42 -0700)
committerLinus Torvalds <[email protected]>
Thu, 27 May 2010 16:12:41 +0000 (09:12 -0700)
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 <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/gpio/gpiolib.c

index 05019c15a8684c53730bcbde200537df23cdb36a..362a613d266e7ca079a051f330cd800d5f7fa1fe 100644 (file)
@@ -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;