mfd: Remove redundant spi driver bus initialization
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 24 Nov 2011 15:29:15 +0000 (16:29 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 8 Jan 2012 23:37:31 +0000 (00:37 +0100)
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>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/mc13xxx-core.c
drivers/mfd/tps65912-spi.c
drivers/mfd/wm831x-spi.c

index e9619acc02375342276d84e5d9aee83e7a2597a8..4417380484586ba29dc57b5346d8064bfba3d04e 100644 (file)
@@ -805,7 +805,6 @@ static struct spi_driver mc13xxx_driver = {
        .id_table = mc13xxx_device_id,
        .driver = {
                .name = "mc13xxx",
-               .bus = &spi_bus_type,
                .owner = THIS_MODULE,
        },
        .probe = mc13xxx_probe,
index 6d71e0d2574498abb3c5d22c4b91cb24fefe4c5b..27d3302d56b8f2b13bb8ffad371c33d67d3e529c 100644 (file)
@@ -111,7 +111,6 @@ static int __devexit tps65912_spi_remove(struct spi_device *spi)
 static struct spi_driver tps65912_spi_driver = {
        .driver = {
                .name = "tps65912",
-               .bus = &spi_bus_type,
                .owner = THIS_MODULE,
        },
        .probe  = tps65912_spi_probe,
index a43cba373001a7c7426cf1b0a8e3f0276bc92967..62ef3254105ffdebef5dcdcfa476a038ca14f997 100644 (file)
@@ -94,7 +94,6 @@ MODULE_DEVICE_TABLE(spi, wm831x_spi_id);
 static struct spi_driver wm831x_spi_driver = {
        .driver = {
                .name   = "wm831x",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
                .pm     = &wm831x_spi_pm,
        },