Commit 5d3667ee authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by David Woodhouse

mtd: 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 0f769d3f
...@@ -992,7 +992,6 @@ static int __devexit m25p_remove(struct spi_device *spi) ...@@ -992,7 +992,6 @@ static int __devexit m25p_remove(struct spi_device *spi)
static struct spi_driver m25p80_driver = { static struct spi_driver m25p80_driver = {
.driver = { .driver = {
.name = "m25p80", .name = "m25p80",
.bus = &spi_bus_type,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.id_table = m25p_ids, .id_table = m25p_ids,
......
...@@ -936,7 +936,6 @@ static int __devexit dataflash_remove(struct spi_device *spi) ...@@ -936,7 +936,6 @@ static int __devexit dataflash_remove(struct spi_device *spi)
static struct spi_driver dataflash_driver = { static struct spi_driver dataflash_driver = {
.driver = { .driver = {
.name = "mtd_dataflash", .name = "mtd_dataflash",
.bus = &spi_bus_type,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = dataflash_dt_ids, .of_match_table = dataflash_dt_ids,
}, },
......
...@@ -444,7 +444,6 @@ static int __devexit sst25l_remove(struct spi_device *spi) ...@@ -444,7 +444,6 @@ static int __devexit sst25l_remove(struct spi_device *spi)
static struct spi_driver sst25l_driver = { static struct spi_driver sst25l_driver = {
.driver = { .driver = {
.name = "sst25l", .name = "sst25l",
.bus = &spi_bus_type,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = sst25l_probe, .probe = sst25l_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment