spi/sc18is602: Return -EINVAL for probe failures due to I2C function mismatch
authorGuenter Roeck <linux@roeck-us.net>
Thu, 23 Aug 2012 00:28:55 +0000 (17:28 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 23 Aug 2012 11:13:54 +0000 (12:13 +0100)
commit58ed90de3ef58a19c035355a4a0cd6dfef6d6b0c
tree41dd44c2d22f365d9d7f2cb4b1335cf9d3180952
parent41962f90c605983fb04c23bab9c060c9f49ee4c3
spi/sc18is602: Return -EINVAL for probe failures due to I2C function mismatch

If the I2C bus master driver does not support the required functionality,
the driver returns -ENODEV. This causes a silent probe failure without error
message. Since the device has to be explicitly instantiated, and the user
should know the correct bus, this event really reflects an error condition.
Replace error return value with -EINVAL to trigger an error message showing
that the probe function failed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-sc18is602.c