Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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 = {		\