spi: Return error from of_spi_register_master on bad "cs-gpios" property
authorAndreas Larsson <andreas@gaisler.com>
Wed, 13 Feb 2013 13:23:24 +0000 (14:23 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Sun, 7 Apr 2013 09:12:21 +0000 (10:12 +0100)
commit8ec5d84ef51cc64ed02bb9bf0e43a652178252c1
tree03c1baca689bcd9b34cef525f7d7579a7e9662c5
parent446411e18b2cb17d153e45f634a3c9a79ada3ac2
spi: Return error from of_spi_register_master on bad "cs-gpios" property

This makes sure that an error is returned on an incorrectly formed
"cs-gpios" property, but reports success when the "cs-gpios" property is
well formed or missing.

When holes in the cs-gpios property phandle list is used to indicate
that some other form of chipselect is to be used it is important that
failure to read a broken "cs-gpios" property does not silently fail
leading to the spi controller to use an unintended chipselect.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi.c