mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
spi: Merge spi_controller.{slave,target}_abort()
[ Upstream commit6c6871cdae] Mixing SPI slave/target handlers and SPI slave/target controllers using legacy and modern naming does not work well: there are now two different callbacks for aborting a slave/target operation, of which only one is populated, while spi_{slave,target}_abort() check and use only one, which may be the unpopulated one. Fix this by merging the slave/target abort callbacks into a single callback using a union, like is already done for the slave/target flags. Fixes:b8d3b056a7("spi: introduce new helpers with using modern naming") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/809c82d54b85dd87ef7ee69fc93016085be85cec.1667555967.git.geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
53ce433a6d
commit
2f5e8322cd
@@ -676,8 +676,10 @@ struct spi_controller {
|
|||||||
struct spi_message *message);
|
struct spi_message *message);
|
||||||
int (*unprepare_message)(struct spi_controller *ctlr,
|
int (*unprepare_message)(struct spi_controller *ctlr,
|
||||||
struct spi_message *message);
|
struct spi_message *message);
|
||||||
int (*slave_abort)(struct spi_controller *ctlr);
|
union {
|
||||||
int (*target_abort)(struct spi_controller *ctlr);
|
int (*slave_abort)(struct spi_controller *ctlr);
|
||||||
|
int (*target_abort)(struct spi_controller *ctlr);
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These hooks are for drivers that use a generic implementation
|
* These hooks are for drivers that use a generic implementation
|
||||||
|
|||||||
Reference in New Issue
Block a user