This cleanup was already completed between end 2011 and early 2012
with a patch series from Lars-Peter Clausen:
https://lkml.org/lkml/2011/11/24/190
Later on new redundant initialization re-appeared here and there.
Time to cleanup again.
And, yes, I'm lazy! I copy-paste the exact same commit message from
Lars-Peter; only minor reformat to stay in 75 char/line and fix the
name of spi_register_driver().
Regards,
Antonio
Antonio Borneo (6):
ASoC: wm0010: Remove redundant spi driver bus initialization
iio: ssp_sensors: Remove redundant spi driver bus initialization
staging: mt29f_spinand: Remove redundant spi driver bus initialization
net: ieee802154: Remove redundant spi driver bus initialization
wireless: cw1200: Remove redundant spi driver bus initialization
[media] s5c73m3: Remove redundant spi driver bus initialization
drivers/iio/common/ssp_sensors/ssp_dev.c | 1 -
drivers/media/i2c/s5c73m3/s5c73m3-spi.c | 1 -
drivers/net/ieee802154/cc2520.c | 1 -
drivers/net/ieee802154/mrf24j40.c | 1 -
drivers/net/wireless/cw1200/cw1200_spi.c | 1 -
drivers/staging/mt29f_spinand/mt29f_spinand.c | 1 -
sound/soc/codecs/wm0010.c | 1 -
7 files changed, 7 deletions(-)
--
2.4.4
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.
Signed-off-by: Antonio Borneo <[email protected]>
To: Jaroslav Kysela <[email protected]>
To: Takashi Iwai <[email protected]>
To: Liam Girdwood <[email protected]>
To: Mark Brown <[email protected]>
To: [email protected]
To: [email protected]
Cc: [email protected]
---
sound/soc/codecs/wm0010.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
index f37989e..61bfff4 100644
--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -1005,7 +1005,6 @@ static int wm0010_spi_remove(struct spi_device *spi)
static struct spi_driver wm0010_spi_driver = {
.driver = {
.name = "wm0010",
- .bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.probe = wm0010_spi_probe,
--
2.4.4
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.
Signed-off-by: Antonio Borneo <[email protected]>
To: Jonathan Cameron <[email protected]>
To: Lars-Peter Clausen <[email protected]>
To: Karol Wrona <[email protected]>
To: [email protected]
Cc: [email protected]
---
drivers/iio/common/ssp_sensors/ssp_dev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
index 9a40097..d338bb5 100644
--- a/drivers/iio/common/ssp_sensors/ssp_dev.c
+++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
@@ -700,7 +700,6 @@ static struct spi_driver ssp_driver = {
.remove = ssp_remove,
.driver = {
.pm = &ssp_pm_ops,
- .bus = &spi_bus_type,
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(ssp_of_match),
.name = "sensorhub"
--
2.4.4
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.
Signed-off-by: Antonio Borneo <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: [email protected]
Cc: [email protected]
---
drivers/staging/mt29f_spinand/mt29f_spinand.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c
index 7285c64..ad30ce4 100644
--- a/drivers/staging/mt29f_spinand/mt29f_spinand.c
+++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c
@@ -948,7 +948,6 @@ static const struct of_device_id spinand_dt[] = {
static struct spi_driver spinand_driver = {
.driver = {
.name = "mt29f",
- .bus = &spi_bus_type,
.owner = THIS_MODULE,
.of_match_table = spinand_dt,
},
--
2.4.4
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.
Signed-off-by: Antonio Borneo <[email protected]>
To: Alan Ott <[email protected]>
To: Alexander Aring <[email protected]>
To: Varka Bhadram <[email protected]>
To: [email protected]
To: [email protected]
Cc: [email protected]
---
drivers/net/ieee802154/cc2520.c | 1 -
drivers/net/ieee802154/mrf24j40.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
index f833b8b..bd957f1 100644
--- a/drivers/net/ieee802154/cc2520.c
+++ b/drivers/net/ieee802154/cc2520.c
@@ -1046,7 +1046,6 @@ MODULE_DEVICE_TABLE(of, cc2520_of_ids);
static struct spi_driver cc2520_driver = {
.driver = {
.name = "cc2520",
- .bus = &spi_bus_type,
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(cc2520_of_ids),
},
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index fba2dfd..bc8fb26 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -812,7 +812,6 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
static struct spi_driver mrf24j40_driver = {
.driver = {
.name = "mrf24j40",
- .bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.id_table = mrf24j40_ids,
--
2.4.4
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.
Signed-off-by: Antonio Borneo <[email protected]>
To: Solomon Peachy <[email protected]>
To: Kalle Valo <[email protected]>
To: [email protected]
To: [email protected]
Cc: [email protected]
---
drivers/net/wireless/cw1200/cw1200_spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c
index 7603546..29185ae 100644
--- a/drivers/net/wireless/cw1200/cw1200_spi.c
+++ b/drivers/net/wireless/cw1200/cw1200_spi.c
@@ -467,7 +467,6 @@ static struct spi_driver spi_driver = {
.remove = cw1200_spi_disconnect,
.driver = {
.name = "cw1200_wlan_spi",
- .bus = &spi_bus_type,
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &cw1200_pm_ops,
--
2.4.4
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.
Signed-off-by: Antonio Borneo <[email protected]>
To: Mauro Carvalho Chehab <[email protected]>
To: Kyungmin Park <[email protected]>
To: Andrzej Hajda <[email protected]>
To: [email protected]
Cc: [email protected]
---
drivers/media/i2c/s5c73m3/s5c73m3-spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-spi.c b/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
index 63eb190..fa4a5eb 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
@@ -149,7 +149,6 @@ int s5c73m3_register_spi_driver(struct s5c73m3 *state)
spidrv->remove = s5c73m3_spi_remove;
spidrv->probe = s5c73m3_spi_probe;
spidrv->driver.name = S5C73M3_SPI_DRV_NAME;
- spidrv->driver.bus = &spi_bus_type;
spidrv->driver.owner = THIS_MODULE;
spidrv->driver.of_match_table = s5c73m3_spi_ids;
--
2.4.4
Hi Antonio Borneo,
On Tuesday 23 June 2015 08:22 PM, Antonio Borneo wrote:
> 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.
>
> Signed-off-by: Antonio Borneo <[email protected]>
> To: Alan Ott <[email protected]>
> To: Alexander Aring <[email protected]>
> To: Varka Bhadram <[email protected]>
> To: [email protected]
> To: [email protected]
> Cc: [email protected]
> ---
> drivers/net/ieee802154/cc2520.c | 1 -
> drivers/net/ieee802154/mrf24j40.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
> index f833b8b..bd957f1 100644
> --- a/drivers/net/ieee802154/cc2520.c
> +++ b/drivers/net/ieee802154/cc2520.c
> @@ -1046,7 +1046,6 @@ MODULE_DEVICE_TABLE(of, cc2520_of_ids);
> static struct spi_driver cc2520_driver = {
> .driver = {
> .name = "cc2520",
> - .bus = &spi_bus_type,
> .owner = THIS_MODULE,
> .of_match_table = of_match_ptr(cc2520_of_ids),
> },
Acked-by: Varka Bhadram <[email protected]>
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index fba2dfd..bc8fb26 100644
> --- a/drivers/net/ieee802154/mrf24j40.c
> +++ b/drivers/net/ieee802154/mrf24j40.c
> @@ -812,7 +812,6 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
> static struct spi_driver mrf24j40_driver = {
> .driver = {
> .name = "mrf24j40",
> - .bus = &spi_bus_type,
> .owner = THIS_MODULE,
> },
> .id_table = mrf24j40_ids,
--
Best regards,
Varka Bhadram.
On 06/23/2015 10:52 AM, Antonio Borneo wrote:
> 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.
>
> Signed-off-by: Antonio Borneo <[email protected]>
> To: Alan Ott <[email protected]>
> To: Alexander Aring <[email protected]>
> To: Varka Bhadram <[email protected]>
> To: [email protected]
> To: [email protected]
> Cc: [email protected]
> ---
> drivers/net/ieee802154/cc2520.c | 1 -
> drivers/net/ieee802154/mrf24j40.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
> index f833b8b..bd957f1 100644
> --- a/drivers/net/ieee802154/cc2520.c
> +++ b/drivers/net/ieee802154/cc2520.c
> @@ -1046,7 +1046,6 @@ MODULE_DEVICE_TABLE(of, cc2520_of_ids);
> static struct spi_driver cc2520_driver = {
> .driver = {
> .name = "cc2520",
> - .bus = &spi_bus_type,
> .owner = THIS_MODULE,
> .of_match_table = of_match_ptr(cc2520_of_ids),
> },
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index fba2dfd..bc8fb26 100644
> --- a/drivers/net/ieee802154/mrf24j40.c
> +++ b/drivers/net/ieee802154/mrf24j40.c
> @@ -812,7 +812,6 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
> static struct spi_driver mrf24j40_driver = {
> .driver = {
> .name = "mrf24j40",
> - .bus = &spi_bus_type,
> .owner = THIS_MODULE,
> },
> .id_table = mrf24j40_ids,
Acked-by: Alan Ott <[email protected]>
On 06/23/2015 04:53 PM, Antonio Borneo wrote:
> 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.
>
> Signed-off-by: Antonio Borneo <[email protected]>
> To: Mauro Carvalho Chehab <[email protected]>
> To: Kyungmin Park <[email protected]>
> To: Andrzej Hajda <[email protected]>
> To: [email protected]
> Cc: [email protected]
Reviewed-by: Andrzej Hajda <[email protected]>
Regards
Andrzej
> ---
> drivers/media/i2c/s5c73m3/s5c73m3-spi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-spi.c b/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
> index 63eb190..fa4a5eb 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
> @@ -149,7 +149,6 @@ int s5c73m3_register_spi_driver(struct s5c73m3 *state)
> spidrv->remove = s5c73m3_spi_remove;
> spidrv->probe = s5c73m3_spi_probe;
> spidrv->driver.name = S5C73M3_SPI_DRV_NAME;
> - spidrv->driver.bus = &spi_bus_type;
> spidrv->driver.owner = THIS_MODULE;
> spidrv->driver.of_match_table = s5c73m3_spi_ids;
>
On 06/23/2015 04:52 PM, Antonio Borneo wrote:
> 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.
>
> Signed-off-by: Antonio Borneo <[email protected]>
> To: Jonathan Cameron <[email protected]>
> To: Lars-Peter Clausen <[email protected]>
> To: Karol Wrona <[email protected]>
> To: [email protected]
> Cc: [email protected]
> ---
> drivers/iio/common/ssp_sensors/ssp_dev.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
> index 9a40097..d338bb5 100644
> --- a/drivers/iio/common/ssp_sensors/ssp_dev.c
> +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
> @@ -700,7 +700,6 @@ static struct spi_driver ssp_driver = {
> .remove = ssp_remove,
> .driver = {
> .pm = &ssp_pm_ops,
> - .bus = &spi_bus_type,
> .owner = THIS_MODULE,
> .of_match_table = of_match_ptr(ssp_of_match),
> .name = "sensorhub"
>
Acked-by: Karol Wrona <[email protected]>
On 29/06/15 11:05, Karol Wrona wrote:
> On 06/23/2015 04:52 PM, Antonio Borneo wrote:
>> 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.
>>
>> Signed-off-by: Antonio Borneo <[email protected]>
>> To: Jonathan Cameron <[email protected]>
>> To: Lars-Peter Clausen <[email protected]>
>> To: Karol Wrona <[email protected]>
>> To: [email protected]
>> Cc: [email protected]
>> ---
>> drivers/iio/common/ssp_sensors/ssp_dev.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
>> index 9a40097..d338bb5 100644
>> --- a/drivers/iio/common/ssp_sensors/ssp_dev.c
>> +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
>> @@ -700,7 +700,6 @@ static struct spi_driver ssp_driver = {
>> .remove = ssp_remove,
>> .driver = {
>> .pm = &ssp_pm_ops,
>> - .bus = &spi_bus_type,
>> .owner = THIS_MODULE,
>> .of_match_table = of_match_ptr(ssp_of_match),
>> .name = "sensorhub"
>>
> Acked-by: Karol Wrona <[email protected]>
Applied to the togreg branch of iio.git
Thanks,
J
>
On Tue, Jun 23, 2015 at 10:52:52PM +0800, Antonio Borneo wrote:
> 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.
>
Marcel,
I don't see this patch in any linux-next, net-next, bluetooth-next tree.
Could you please apply this patch with the acks by Alan and Varka?
- Alex
Hi Antonio,
> 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.
>
> Signed-off-by: Antonio Borneo <[email protected]>
> To: Alan Ott <[email protected]>
> To: Alexander Aring <[email protected]>
> To: Varka Bhadram <[email protected]>
> To: [email protected]
> To: [email protected]
> Cc: [email protected]
> ---
> drivers/net/ieee802154/cc2520.c | 1 -
> drivers/net/ieee802154/mrf24j40.c | 1 -
> 2 files changed, 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
> 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.
>
> Signed-off-by: Antonio Borneo <[email protected]>
> To: Solomon Peachy <[email protected]>
> To: Kalle Valo <[email protected]>
> To: [email protected]
> To: [email protected]
> Cc: [email protected]
Thanks, applied to wireless-drivers-next.git.
Kalle Valo