]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] spi_bitbang(): use overridable setup_transfer() method
authorHans-Peter Nilsson <hans-peter.nilsson@axis.com>
Mon, 12 Feb 2007 08:52:44 +0000 (00:52 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 12 Feb 2007 17:48:31 +0000 (09:48 -0800)
commit603b6c463d6a1a564285b76095b3668a3f233c08
tree722c72263bb4259bc787b8236673e727182dac98
parent877f3af54b7cdff00764f6393b25d8b5079fec40
[PATCH] spi_bitbang(): use overridable setup_transfer() method

A small bug-fix for spi_bitbang: it must always call the setup_transfer
function via the overridable pointer, not assume that its
spi_bitbang_setup_transfer is sufficient.  Otherwise, if all options in the
transfers are default (0), the overrided function will never be called.

Granted, the function replacing it must call spi_bitbang_setup_transfer,
but it might also have other important things to do, even if the second
argument (the spi_transfer) is NULL.  Tested together with the other
patches on the spi_crisv32_sser and spi_crisv32_gpio drivers (not yet in
the kernel, will IIUC be submitted as part of the usual
arch-maintainer-pushes).

Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/spi_bitbang.c