TTY: Remove redundant spi driver bus initialization
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 24 Nov 2011 15:29:12 +0000 (16:29 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 04:19:21 +0000 (20:19 -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_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: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/ifx6x60.c
drivers/tty/serial/max3100.c
drivers/tty/serial/max3107-aava.c
drivers/tty/serial/max3107.c
drivers/tty/serial/mrst_max3110.c

index 426434e5eb7c0d9ef57b8a6f3aeb047ad5f94f1d..7e925e20cbaaae5a5b65c9e5a5bb17d33f8381da 100644 (file)
@@ -1334,7 +1334,6 @@ MODULE_DEVICE_TABLE(spi, ifx_id_table);
 static const struct spi_driver ifx_spi_driver = {
        .driver = {
                .name = DRVNAME,
-               .bus = &spi_bus_type,
                .pm = &ifx_spi_pm,
                .owner = THIS_MODULE},
        .probe = ifx_spi_spi_probe,
index 8a6cc8c30b5a74eafdb774e1986712d9e80da61c..b4902b99cfd2301793785a527561ca2caf8d8b99 100644 (file)
@@ -901,7 +901,6 @@ static int max3100_resume(struct spi_device *spi)
 static struct spi_driver max3100_driver = {
        .driver = {
                .name           = "max3100",
-               .bus            = &spi_bus_type,
                .owner          = THIS_MODULE,
        },
 
index 90c40f22ec709422e51a52648db2ea2fde4bfd9a..aae772a71de6ade2083e38288faf11e821d84f08 100644 (file)
@@ -315,7 +315,6 @@ static int __devinit max3107_probe_aava(struct spi_device *spi)
 static struct spi_driver max3107_driver = {
        .driver = {
                .name           = "aava-max3107",
-               .bus            = &spi_bus_type,
                .owner          = THIS_MODULE,
        },
        .probe          = max3107_probe_aava,
index 7827000db4f558901a92551fd067943b78c079ed..17c7ba805d989353dab24dbd90bfce6b5dd05f0a 100644 (file)
@@ -1181,7 +1181,6 @@ static int max3107_probe_generic(struct spi_device *spi)
 static struct spi_driver max3107_driver = {
        .driver = {
                .name           = "max3107",
-               .bus            = &spi_bus_type,
                .owner          = THIS_MODULE,
        },
        .probe          = max3107_probe_generic,
index 4c309e8699031aca5408fab078c5ccd61e885fef..df2a2240a3aeda3a9aee82a22ad7e94914394173 100644 (file)
@@ -876,7 +876,6 @@ static int __devexit serial_m3110_remove(struct spi_device *dev)
 static struct spi_driver uart_max3110_driver = {
        .driver = {
                        .name   = "spi_max3111",
-                       .bus    = &spi_bus_type,
                        .owner  = THIS_MODULE,
        },
        .probe          = serial_m3110_probe,