spi: Dont call master->setup if not populated
commitcaae070c48f39b4f7312e7473f6d3576f426e7fb
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 9 Nov 2012 09:05:22 +0000 (9 14:35 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 9 Nov 2012 16:46:48 +0000 (9 16:46 +0000)
tree09afeaeb4cd7b26fa2345f883889d87191575a1b
parent3d70f8c617a436c7146ecb81df2265b4626dfe89
spi: Dont call master->setup if not populated

Currently the master->setup() is called unconditionally.
The assumption is that every driver need to implement this
callback. This encourages drivers to populate empty functions
to prevent crashing.

This patch prevents the call of master->setup() if it is not
populated.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi.c