Skip to contentSkip to conversation

Remove redundant spi driver bus initialization

PATCH Applied Antonio Borneo 11 participants 18 messages Jun 23, 2015 – Jul 21, 2015

Subsystems (14)
lore
Share & tools
lore
#0 lore raw

cover Remove redundant spi driver bus initialization

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(-)
Signature · 1 line
2.4.4
#1 lore raw

PATCH 1/6 ASoC: wm0010: 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_register_driver(), so we can drop the manual assignment.

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(-)
sound/soc/codecs/wm0010.c +0 -1
index f37989e..61bfff4 100644
@@ -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,
Signature · 1 line
2.4.4
#2 lore raw

PATCH 1/6 ASoC: wm0010: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

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.

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(-)
sound/soc/codecs/wm0010.c +0 -1
index f37989e..61bfff4 100644
@@ -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,
Signature · 1 line
2.4.4
Acked-by on v1 1/6
#3 lore raw

Re: [PATCH 1/6] ASoC: wm0010: Remove redundant spi driver bus initialization

Quoted 5 lines · Antonio Borneo

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.

Quoted 8 lines

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]
---

Thanks,
Charles

maintainer
#4 lore raw

Applied "ASoC: wm0010: Remove redundant spi driver bus initialization" to the asoc tree

In reply to Antonio Borneo

The patch

ASoC: wm0010: Remove redundant spi driver bus initialization

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 7a28db9906a993ec43226fb6927f35b8af6cc83c Mon Sep 17 00:00:00 2001

From: Antonio Borneo <[email protected]>
Date: Tue, 23 Jun 2015 22:52:12 +0800
Subject: [PATCH] ASoC: wm0010: 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_register_driver(), so we can drop the manual assignment.

---
 sound/soc/codecs/wm0010.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/wm0010.c +0 -1
index f37989e..61bfff4 100644
@@ -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,
Signature · 1 line
2.1.4
#5 lore raw

PATCH 2/6 iio: ssp_sensors: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

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.

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(-)
drivers/iio/common/ssp_sensors/ssp_dev.c +0 -1
index 9a40097..d338bb5 100644
@@ -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"
Signature · 1 line
2.4.4
Acked-by on v1 2/6
#6 lore raw

Re: [PATCH 2/6] iio: ssp_sensors: Remove redundant spi driver bus initialization

Quoted 20 lines · Antonio Borneo

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.

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(-)
drivers/iio/common/ssp_sensors/ssp_dev.c +0 -0
index 9a40097..d338bb5 100644

drivers/iio/common/ssp_sensors/ssp_dev.c static struct spi_driver ssp_driver = { · line 705

Quoted 7 lines
drivers/iio/common/ssp_sensors/ssp_dev.c +0 -1
@@ -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"
maintainer Applied
#7 lore raw

Re: [PATCH 2/6] iio: ssp_sensors: Remove redundant spi driver bus initialization

Quoted 15 lines · Karol Wrona
Quoted 14 lines · Antonio Borneo

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.

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(-)
Quoted 14 lines

drivers/iio/common/ssp_sensors/ssp_dev.c static struct spi_driver ssp_driver = { · line 705

Quoted 13 lines
drivers/iio/common/ssp_sensors/ssp_dev.c +0 -1
index 9a40097..d338bb5 100644
@@ -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"

Applied to the togreg branch of iio.git

Thanks,

J

Quoted 1 line
#8 lore raw

PATCH 3/6 staging: mt29f_spinand: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

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.

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(-)
drivers/staging/mt29f_spinand/mt29f_spinand.c +0 -1
index 7285c64..ad30ce4 100644
@@ -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,
 	},
Signature · 1 line
2.4.4
#9 lore raw

PATCH 4/6 net: ieee802154: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

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.

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(-)
drivers/net/ieee802154/cc2520.c +0 -1
index f833b8b..bd957f1 100644
@@ -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),
 	},
drivers/net/ieee802154/mrf24j40.c +0 -1
index fba2dfd..bc8fb26 100644
@@ -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,
Signature · 1 line
2.4.4
Acked-by on v1 4/6
#10 lore raw

Re: [PATCH 4/6] net: ieee802154: Remove redundant spi driver bus initialization

Hi Antonio Borneo,

Quoted 21 lines · Antonio Borneo

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.

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(-)
drivers/net/ieee802154/cc2520.c +0 -0
index f833b8b..bd957f1 100644

drivers/net/ieee802154/cc2520.c MODULE_DEVICE_TABLE(of, cc2520_of_ids); · line 1051

Quoted 7 lines
drivers/net/ieee802154/cc2520.c +0 -1
@@ -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),
  	},
Quoted 12 lines
drivers/net/ieee802154/mrf24j40.c +0 -1
index fba2dfd..bc8fb26 100644
@@ -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,
Signature · 2 lines
Best regards,
Varka Bhadram.
Acked-by on v1 4/6
#11 lore raw

Re: [PATCH 4/6] net: ieee802154: Remove redundant spi driver bus initialization

In reply to Antonio Borneo
Quoted 33 lines · Antonio Borneo

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.

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(-)
drivers/net/ieee802154/cc2520.c +0 -1
index f833b8b..bd957f1 100644
@@ -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),
  	},
drivers/net/ieee802154/mrf24j40.c +0 -0
index fba2dfd..bc8fb26 100644

drivers/net/ieee802154/mrf24j40.c MODULE_DEVICE_TABLE(spi, mrf24j40_ids); · line 817

Quoted 7 lines
drivers/net/ieee802154/mrf24j40.c +0 -1
@@ -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,
maintainer
#12 lore raw

Re: [PATCH 4/6] net: ieee802154: Remove redundant spi driver bus initialization

In reply to Antonio Borneo
Quoted 4 lines · Antonio Borneo

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

#13 lore raw

Re: [PATCH 4/6] net: ieee802154: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

Hi Antonio,

Quoted 14 lines

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.

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 -

Quoted 1 line
2 files changed, 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

#14 lore raw

PATCH 5/6 wireless: cw1200: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

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.

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(-)
drivers/net/wireless/cw1200/cw1200_spi.c +0 -1
index 7603546..29185ae 100644
@@ -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,
Signature · 1 line
2.4.4
Applied
#15 lore raw

Re: [5/6] wireless: cw1200: Remove redundant spi driver bus initialization

Quoted 11 lines

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.

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

#16 lore raw

PATCH 6/6 s5c73m3: Remove redundant spi driver bus initialization

In reply to Antonio Borneo

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.

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(-)
drivers/media/i2c/s5c73m3/s5c73m3-spi.c +0 -1
index 63eb190..fa4a5eb 100644
@@ -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;
 
Signature · 1 line
2.4.4
Reviewed-by on v1 6/6
#17 lore raw

Re: [PATCH 6/6] [media] s5c73m3: Remove redundant spi driver bus initialization

Quoted 10 lines · Antonio Borneo

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.

To: Mauro Carvalho Chehab <[email protected]>
To: Kyungmin Park <[email protected]>
To: Andrzej Hajda <[email protected]>
To: [email protected]
Cc: [email protected]

Regards
Andrzej

Quoted 16 lines
---
 drivers/media/i2c/s5c73m3/s5c73m3-spi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/i2c/s5c73m3/s5c73m3-spi.c +0 -1
index 63eb190..fa4a5eb 100644
@@ -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;