summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-02-25 16:42:27 +0300
committerMark Brown <broonie@kernel.org>2026-02-25 16:42:27 +0300
commit463279e5881184b608e00b335feba5411a1814e1 (patch)
treed024857794e2d5e445f948612be6432332bea086 /include/linux
parent7c12f6ead4672cb08b74e6f6115eb04dca8ccfa4 (diff)
parente02902dd493bf9c9b05353c761737ac514ad7a5c (diff)
downloadlinux-463279e5881184b608e00b335feba5411a1814e1.tar.xz
spi: add devm_spi_new_ancillary_device()
Merge series from Antoniu Miclaus <antoniu.miclaus@analog.com>: Add a devres-managed version of spi_new_ancillary_device() that automatically unregisters the ancillary SPI device when the parent device is removed.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/spi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index af7cfee7b8f6..1c9aab627583 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -387,6 +387,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
}
extern struct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 chip_select);
+extern struct spi_device *devm_spi_new_ancillary_device(struct spi_device *spi, u8 chip_select);
/* Use a define to avoid include chaining to get THIS_MODULE */
#define spi_register_driver(driver) \