Commit d1eba93b authored by Geliang Tang's avatar Geliang Tang Committed by Mark Brown

spi: use to_spi_device

Use to_spi_device() instead of open-coding it.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8005c49d
......@@ -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 = { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment