projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8005c49
)
spi: use to_spi_device
author
Geliang Tang
<geliangtang@163.com>
Tue, 22 Dec 2015 16:18:41 +0000
(
00:18
+0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 23 Dec 2015 12:15:41 +0000
(12:15 +0000)
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>
drivers/spi/spi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi.c
b/drivers/spi/spi.c
index e2415be209d5a77e9224add30db37d65244fabda..70828521e6bb66c17758437fd98f13660ca0ab74 100644
(file)
--- a/
drivers/spi/spi.c
+++ b/
drivers/spi/spi.c
@@
-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 = { \