spi: Dont call prepare/unprepare transfer if not populated
authorShubhrajyoti D <shubhrajyoti@ti.com>
Thu, 10 May 2012 13:50:41 +0000 (19:20 +0530)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 11 May 2012 03:23:58 +0000 (21:23 -0600)
commit7dfd2bd70228d1f8d468d58cb3d12ecd618479ed
tree5388c3c8ba4907ed86e7401da969e917a4f30586
parent6d6467ee58b4cddd34b01d642d282a353dd57ce9
spi: Dont call prepare/unprepare transfer if not populated

Currently the prepare/unprepare transfer are called unconditionally.
The assumption is that every driver using the spi core queue infrastructure
has to populate the prepare and unprepare functions. This encourages
drivers to populate empty functions to prevent crashing.
This patch prevents the call to prepare/unprepare if not populated.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
[grant.likely: fix whitespace defect]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi.c