summaryrefslogtreecommitdiff
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2022-11-04 11:01:27 +0100
committerMark Brown <broonie@kernel.org>2022-11-04 13:00:06 +0000
commit6c6871cdaef96361f6b79a3e45d451a6475df4d6 (patch)
treeabd282bedb9a205b975f7377862e60586f6579a1 /include/linux/spi/spi.h
parentd82316d3cf1fcecd461b80ddb97d9ea6d7cba60d (diff)
spi: Merge spi_controller.{slave,target}_abort()
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: b8d3b056a78dcc94 ("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>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 798c30229e07..9a32495fbb1f 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -655,8 +655,10 @@ struct spi_controller {
struct spi_message *message);
int (*unprepare_message)(struct spi_controller *ctlr,
struct spi_message *message);
- int (*slave_abort)(struct spi_controller *ctlr);
- int (*target_abort)(struct spi_controller *ctlr);
+ union {
+ int (*slave_abort)(struct spi_controller *ctlr);
+ int (*target_abort)(struct spi_controller *ctlr);
+ };
/*
* These hooks are for drivers that use a generic implementation