]> Git Repo - linux.git/commit - drivers/gpio/gpio-pcf857x.c
gpio: fix probe() error return in gpio driver probes
authorBen Dooks <[email protected]>
Thu, 15 Jan 2009 21:50:45 +0000 (13:50 -0800)
committerLinus Torvalds <[email protected]>
Fri, 16 Jan 2009 00:39:35 +0000 (16:39 -0800)
commita342d215c206d955fea55d778e3803b29ee41b60
tree36e831878b6ed7e004d5f4e6c667b4053c756f83
parent5b96f1729064453e09805a387378e0644da1c937
gpio: fix probe() error return in gpio driver probes

A number of drivers in drivers/gpio return -ENODEV when confronted with
missing setup parameters such as the platform data.  However, returning
-ENODEV causes the driver layer to silently ignore the driver as it
assumes the probe did not find anything and was only speculative.

To make life easier to discern why a driver is not being attached, change
to returning -EINVAL, which is a better description of the fact that the
driver data was not valid.

Also add a set of dev_dbg() statements to the error paths to provide an
better explanation of the error as there may be more that one point in the
driver.

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/max7301.c
drivers/gpio/max732x.c
drivers/gpio/mcp23s08.c
drivers/gpio/pca953x.c
drivers/gpio/pcf857x.c
This page took 0.068868 seconds and 4 git commands to generate.