staging:iio: Remove redundant spi driver bus initialization
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 5 Dec 2011 15:53:05 +0000 (16:53 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Dec 2011 19:33:19 +0000 (11:33 -0800)
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_register_driver() 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: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 files changed:
drivers/staging/iio/adc/ad7280a.c
drivers/staging/iio/adc/ad7298_core.c
drivers/staging/iio/adc/ad7476_core.c
drivers/staging/iio/adc/ad7606_spi.c
drivers/staging/iio/adc/ad7780.c
drivers/staging/iio/adc/ad7793.c
drivers/staging/iio/adc/ad7816.c
drivers/staging/iio/adc/ad7887_core.c
drivers/staging/iio/adc/adt7310.c
drivers/staging/iio/addac/adt7316-spi.c
drivers/staging/iio/dac/ad5446.c
drivers/staging/iio/dds/ad9832.c
drivers/staging/iio/dds/ad9834.c

index 3fac9b1fc66c3fa0c11a0663baef725f4c5e52a9..941db3a555020e3ef98c515357525f485bc546fb 100644 (file)
@@ -975,7 +975,6 @@ MODULE_DEVICE_TABLE(spi, ad7280_id);
 static struct spi_driver ad7280_driver = {
        .driver = {
                .name   = "ad7280",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad7280_probe,
index 3ccd4b46dcd1de82bb4b0145bb17fcf130612534..656b77be4af45e3200fd7614a1336a0782291932 100644 (file)
@@ -276,7 +276,6 @@ MODULE_DEVICE_TABLE(spi, ad7298_id);
 static struct spi_driver ad7298_driver = {
        .driver = {
                .name   = "ad7298",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad7298_probe,
index 93b2bef0e5fce60416e75ca4417438eb1f0a2816..a42dd19e640fdb4915420fbbf88a0ed935eb4bf7 100644 (file)
@@ -242,7 +242,6 @@ MODULE_DEVICE_TABLE(spi, ad7476_id);
 static struct spi_driver ad7476_driver = {
        .driver = {
                .name   = "ad7476",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad7476_probe,
index c88d97afc60da7a364f90d7c9a14c1fac578a1b2..98e6e49a2874c1010d58bfe3f16978d60744aace 100644 (file)
@@ -102,7 +102,6 @@ MODULE_DEVICE_TABLE(spi, ad7606_id);
 static struct spi_driver ad7606_driver = {
        .driver = {
                .name = "ad7606",
-               .bus = &spi_bus_type,
                .owner = THIS_MODULE,
                .pm    = AD7606_SPI_PM_OPS,
        },
index 635c7bac44b1f29b755c3b3bbee0f1a9dc43506e..5665deeadce7f7c503fc8ded59e00ec0b11d5c67 100644 (file)
@@ -277,7 +277,6 @@ MODULE_DEVICE_TABLE(spi, ad7780_id);
 static struct spi_driver ad7780_driver = {
        .driver = {
                .name   = "ad7780",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad7780_probe,
index 362cc3199291b3aa515cbcd47bb9e7066a4d8503..a70e53a2b8214a31bce40afd6c4dead9b83f855a 100644 (file)
@@ -1041,7 +1041,6 @@ MODULE_DEVICE_TABLE(spi, ad7793_id);
 static struct spi_driver ad7793_driver = {
        .driver = {
                .name   = "ad7793",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad7793_probe,
index 7a344a2716154af32a11c9a3cfee1436bf678d2e..a38a1a931a661206e0c75853b8d21c530e6bfb0b 100644 (file)
@@ -460,7 +460,6 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
 static struct spi_driver ad7816_driver = {
        .driver = {
                .name = "ad7816",
-               .bus = &spi_bus_type,
                .owner = THIS_MODULE,
        },
        .probe = ad7816_probe,
index 8f48659163691bd3c303a305e323bcab8053e48b..ab7a5a20594f726e52ed7673aa127bf15f9d1f1b 100644 (file)
@@ -251,7 +251,6 @@ MODULE_DEVICE_TABLE(spi, ad7887_id);
 static struct spi_driver ad7887_driver = {
        .driver = {
                .name   = "ad7887",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad7887_probe,
index c937ac1838f273433e7087013461da73dd46ccbc..ea9fd43460c8412d54086d1ccd51fa9256192eef 100644 (file)
@@ -877,7 +877,6 @@ MODULE_DEVICE_TABLE(spi, adt7310_id);
 static struct spi_driver adt7310_driver = {
        .driver = {
                .name = "adt7310",
-               .bus = &spi_bus_type,
                .owner = THIS_MODULE,
        },
        .probe = adt7310_probe,
index 369d4d01ed9708e0d65ef2239ce745ea839d1b91..1f75e1bf992a35b835c04f22928844d1617a557c 100644 (file)
@@ -151,7 +151,6 @@ static int adt7316_spi_resume(struct spi_device *spi_dev)
 static struct spi_driver adt7316_driver = {
        .driver = {
                .name = "adt7316",
-               .bus = &spi_bus_type,
                .owner = THIS_MODULE,
        },
        .probe = adt7316_spi_probe,
index 9d53b1092441ca59b7cbdd588f486af08556c9a2..bfd88fa43515f0a8e9953cadfc8eb991f4ee565b 100644 (file)
@@ -440,7 +440,6 @@ MODULE_DEVICE_TABLE(spi, ad5446_id);
 static struct spi_driver ad5446_driver = {
        .driver = {
                .name   = "ad5446",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad5446_probe,
index 1c878207ea87660e69ad3d593676e992b972ab8f..d612d3d55ca7fa1439b29bdf467ab926aa391292 100644 (file)
@@ -349,7 +349,6 @@ MODULE_DEVICE_TABLE(spi, ad9832_id);
 static struct spi_driver ad9832_driver = {
        .driver = {
                .name   = "ad9832",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad9832_probe,
index cd10479730eb387374f789bdaa0d27ca663b8974..59a28134d86932e4b0a3acdcaf0dfc1dd893fb9c 100644 (file)
@@ -440,7 +440,6 @@ MODULE_DEVICE_TABLE(spi, ad9834_id);
 static struct spi_driver ad9834_driver = {
        .driver = {
                .name   = "ad9834",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = ad9834_probe,