Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/rtc/: remove redundant spi driver bus initialization

In ancient times it was necessary to manually initialize the bus field of
an spi_driver to spi_bus_type. These days this is done in
spi_driver_register(), so we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Lars-Peter Clausen and committed by
Linus Torvalds
6c3fb557 681d0378

-5
-1
drivers/rtc/rtc-m41t93.c
··· 200 200 static struct spi_driver m41t93_driver = { 201 201 .driver = { 202 202 .name = "rtc-m41t93", 203 - .bus = &spi_bus_type, 204 203 .owner = THIS_MODULE, 205 204 }, 206 205 .probe = m41t93_probe,
-1
drivers/rtc/rtc-m41t94.c
··· 147 147 static struct spi_driver m41t94_driver = { 148 148 .driver = { 149 149 .name = "rtc-m41t94", 150 - .bus = &spi_bus_type, 151 150 .owner = THIS_MODULE, 152 151 }, 153 152 .probe = m41t94_probe,
-1
drivers/rtc/rtc-max6902.c
··· 154 154 static struct spi_driver max6902_driver = { 155 155 .driver = { 156 156 .name = "rtc-max6902", 157 - .bus = &spi_bus_type, 158 157 .owner = THIS_MODULE, 159 158 }, 160 159 .probe = max6902_probe,
-1
drivers/rtc/rtc-pcf2123.c
··· 340 340 static struct spi_driver pcf2123_driver = { 341 341 .driver = { 342 342 .name = "rtc-pcf2123", 343 - .bus = &spi_bus_type, 344 343 .owner = THIS_MODULE, 345 344 }, 346 345 .probe = pcf2123_probe,
-1
drivers/rtc/rtc-rs5c348.c
··· 229 229 static struct spi_driver rs5c348_driver = { 230 230 .driver = { 231 231 .name = "rtc-rs5c348", 232 - .bus = &spi_bus_type, 233 232 .owner = THIS_MODULE, 234 233 }, 235 234 .probe = rs5c348_probe,