mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 09:36:15 +07:00
spi: use to_spi_device
Use to_spi_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8005c49d9a
commit
d1eba93bd0
@ -84,8 +84,7 @@ static ssize_t spi_device_##field##_show(struct device *dev, \
|
||||
struct device_attribute *attr, \
|
||||
char *buf) \
|
||||
{ \
|
||||
struct spi_device *spi = container_of(dev, \
|
||||
struct spi_device, dev); \
|
||||
struct spi_device *spi = to_spi_device(dev); \
|
||||
return spi_statistics_##field##_show(&spi->statistics, buf); \
|
||||
} \
|
||||
static struct device_attribute dev_attr_spi_device_##field = { \
|
||||
|
Loading…
Reference in New Issue
Block a user