]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: Introduce spi_get_device_match_data() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 20 Oct 2022 19:54:21 +0000 (22:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:13:38 +0000 (15:13 +0100)
commitbd1be85dbbbd4076e8dbdceefc3c4d2c673e0075
treec59f7bcf77a43f4b8b5253d829ad41a6a9526dc5
parentfcf6fce2f147431a8423df382b3c9b7d7c3f34f7
spi: Introduce spi_get_device_match_data() helper

[ Upstream commit aea672d054a21782ed8450c75febb6ba3c208ca4 ]

The proposed spi_get_device_match_data() helper is for retrieving
a driver data associated with the ID in an ID table. First, it tries
to get driver data of the device enumerated by firmware interface
(usually Device Tree or ACPI). If none is found it falls back to
the SPI ID table matching.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221020195421.10482-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: ee4d79055aee ("iio: imu: adis16475: add spi_device_id table")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h