aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-08-08 16:09:49 +0200
committerMark Brown <broonie@linaro.org>2013-08-09 17:32:10 +0100
commit52ade736215fb4421a6dc2b6900703a6fadba9e9 (patch)
tree79669fb2b9f2f6756dabc592b6d2c652f3787bd2
parentc7abc19ca6d48392f91ca04ebe1e9813b3ace435 (diff)
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/spi/spi-bitbang.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
index a89178dc849..dd2e5d7332f 100644
--- a/drivers/spi/spi-bitbang.c
+++ b/drivers/spi/spi-bitbang.c
@@ -446,8 +446,7 @@ int spi_bitbang_start(struct spi_bitbang *bitbang)
master->setup = spi_bitbang_setup;
master->cleanup = spi_bitbang_cleanup;
}
- } else if (!master->setup)
- return -EINVAL;
+ }
/* driver may get busy before register() returns, especially
* if someone registered boardinfo for devices