Skip to content

Commit

Permalink
spi/bitbang: don't error out if there is no setup callback provided
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Mark Brown committed Aug 9, 2013
1 parent c7abc19 commit 52ade73
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52ade73

Please sign in to comment.