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

wireless: 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: Dan Williams <dcbw@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Luciano Coelho <coelho@ti.com>
Cc: libertas-dev@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Lars-Peter Clausen and committed by
John W. Linville
4e3309ba 5220da39

-4
-1
drivers/net/wireless/libertas/if_spi.c
··· 1290 1290 .remove = __devexit_p(libertas_spi_remove), 1291 1291 .driver = { 1292 1292 .name = "libertas_spi", 1293 - .bus = &spi_bus_type, 1294 1293 .owner = THIS_MODULE, 1295 1294 .pm = &if_spi_pm_ops, 1296 1295 },
-1
drivers/net/wireless/p54/p54spi.c
··· 699 699 static struct spi_driver p54spi_driver = { 700 700 .driver = { 701 701 .name = "p54spi", 702 - .bus = &spi_bus_type, 703 702 .owner = THIS_MODULE, 704 703 }, 705 704
-1
drivers/net/wireless/wl1251/spi.c
··· 319 319 static struct spi_driver wl1251_spi_driver = { 320 320 .driver = { 321 321 .name = DRIVER_NAME, 322 - .bus = &spi_bus_type, 323 322 .owner = THIS_MODULE, 324 323 }, 325 324
-1
drivers/net/wireless/wl12xx/spi.c
··· 462 462 static struct spi_driver wl1271_spi_driver = { 463 463 .driver = { 464 464 .name = "wl1271_spi", 465 - .bus = &spi_bus_type, 466 465 .owner = THIS_MODULE, 467 466 }, 468 467