From: Uwe Kleine-König Date: Thu, 8 Aug 2013 14:09:49 +0000 (+0200) Subject: spi/bitbang: don't error out if there is no setup callback provided X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=52ade736215fb4421a6dc2b6900703a6fadba9e9;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c index a89178dc8498..dd2e5d7332f8 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