Commit 52ade736 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Mark Brown

spi/bitbang: don't error out if there is no setup callback provided

It's perfectly valid not to have a setup callback when the probe routine
does all the needed things. So don't even check for this case and trust
the caller.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c7abc19c
...@@ -446,8 +446,7 @@ int spi_bitbang_start(struct spi_bitbang *bitbang) ...@@ -446,8 +446,7 @@ int spi_bitbang_start(struct spi_bitbang *bitbang)
master->setup = spi_bitbang_setup; master->setup = spi_bitbang_setup;
master->cleanup = spi_bitbang_cleanup; master->cleanup = spi_bitbang_cleanup;
} }
} else if (!master->setup) }
return -EINVAL;
/* driver may get busy before register() returns, especially /* driver may get busy before register() returns, especially
* if someone registered boardinfo for devices * if someone registered boardinfo for devices
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment