提交 796a8e42 编写于 作者: B Ben Dooks 提交者: Linus Torvalds

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: NBen Dooks <ben-linux@fluff.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a13c1868
...@@ -1106,7 +1106,7 @@ int gpiochip_add(struct gpio_chip *chip) ...@@ -1106,7 +1106,7 @@ int gpiochip_add(struct gpio_chip *chip)
fail: fail:
/* failures here can mean systems won't boot... */ /* failures here can mean systems won't boot... */
if (status) 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->base, chip->base + chip->ngpio - 1,
chip->label ? : "generic"); chip->label ? : "generic");
return status; return status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册