Skip to contentSkip to conversation

blacklight: Remove redundant spi driver bus initialization

PATCH Applied Lars-Peter Clausen 5 participants 8 messages Apr 10, 2012 – Apr 16, 2012

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

PATCH 1/4 blacklight: 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>

Cc Richard Purdie <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/backlight/ams369fg06.c |    1 -
 drivers/video/backlight/ld9040.c     |    1 -
 drivers/video/backlight/ltv350qv.c   |    1 -
 drivers/video/backlight/s6e63m0.c    |    1 -
 4 files changed, 4 deletions(-)
drivers/video/backlight/ams369fg06.c +0 -1
index 7bdadc7..d2494c5 100644
@@ -619,7 +619,6 @@ static void ams369fg06_shutdown(struct spi_device *spi)
 static struct spi_driver ams369fg06_driver = {
 	.driver = {
 		.name	= "ams369fg06",
-		.bus	= &spi_bus_type,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= ams369fg06_probe,
drivers/video/backlight/ld9040.c +0 -1
index efd352b..2ea06a5f 100644
@@ -846,7 +846,6 @@ static void ld9040_shutdown(struct spi_device *spi)
 static struct spi_driver ld9040_driver = {
 	.driver = {
 		.name	= "ld9040",
-		.bus	= &spi_bus_type,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= ld9040_probe,
drivers/video/backlight/ltv350qv.c +0 -1
index 333949f..d23922f 100644
@@ -310,7 +310,6 @@ static void ltv350qv_shutdown(struct spi_device *spi)
 static struct spi_driver ltv350qv_driver = {
 	.driver = {
 		.name		= "ltv350qv",
-		.bus		= &spi_bus_type,
 		.owner		= THIS_MODULE,
 	},
 
drivers/video/backlight/s6e63m0.c +0 -1
index e264f55..3ed05c7 100644
@@ -899,7 +899,6 @@ static void s6e63m0_shutdown(struct spi_device *spi)
 static struct spi_driver s6e63m0_driver = {
 	.driver = {
 		.name	= "s6e63m0",
-		.bus	= &spi_bus_type,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= s6e63m0_probe,
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/4 can: 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>

---
 drivers/net/can/mcp251x.c |    1 -
 1 file changed, 1 deletion(-)
drivers/net/can/mcp251x.c +0 -1
index 346785c..2bccaf7 100644
@@ -1184,7 +1184,6 @@ MODULE_DEVICE_TABLE(spi, mcp251x_id_table);
 static struct spi_driver mcp251x_can_driver = {
 	.driver = {
 		.name = DEVICE_NAME,
-		.bus = &spi_bus_type,
 		.owner = THIS_MODULE,
 	},
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 3/4 mfd: Remove redundant spi driver bus initialization

In reply to Lars-Peter Clausen

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>

Cc Samuel Ortiz <[email protected]>
Cc Srinidhi Kasagar <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/mfd/da9052-spi.c |    1 -
 drivers/mfd/stmpe-spi.c  |    1 -
 2 files changed, 2 deletions(-)
drivers/mfd/da9052-spi.c +0 -1
index 6faf149..6e09498 100644
@@ -88,7 +88,6 @@ static struct spi_driver da9052_spi_driver = {
 	.id_table = da9052_spi_id,
 	.driver = {
 		.name = "da9052",
-		.bus = &spi_bus_type,
 		.owner = THIS_MODULE,
 	},
 };
drivers/mfd/stmpe-spi.c +0 -1
index b58c43c..afd4590 100644
@@ -122,7 +122,6 @@ MODULE_DEVICE_TABLE(spi, stmpe_id);
 static struct spi_driver stmpe_spi_driver = {
 	.driver = {
 		.name	= "stmpe-spi",
-		.bus	= &spi_bus_type,
 		.owner	= THIS_MODULE,
 #ifdef CONFIG_PM
 		.pm	= &stmpe_dev_pm_ops,
Signature · 1 line
1.7.9.5
Acked-by on v1 3/4
#3 lore raw

Re: [PATCH 3/4] mfd: Remove redundant spi driver bus initialization

Quoted 16 lines · Lars-Peter Clausen

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>

Quoted 4 lines
Cc Samuel Ortiz <[email protected]>
Cc Srinidhi Kasagar <[email protected]>
Cc Linus Walleij <[email protected]>

Looks good to me.

Yours,
Linus Walleij

#4 lore raw

Re: [PATCH 3/4] mfd: Remove redundant spi driver bus initialization

In reply to Lars-Peter Clausen

Hi Lars-Peter,

Quoted 14 lines · Lars-Peter Clausen

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,
    },
};
Quoted 6 lines

// </smpl>

Cc Samuel Ortiz <[email protected]>
Cc Srinidhi Kasagar <[email protected]>
Cc Linus Walleij <[email protected]>

Looks good, patch applied to my for-next branch. Thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#5 lore raw

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

In reply to Lars-Peter Clausen

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>

Cc "David S. Miller" <[email protected]>
Cc Gabor Juhos <[email protected]>
Cc Frederic Lambert <[email protected]>
---
 drivers/net/phy/spi_ks8995.c |    1 -
 1 file changed, 1 deletion(-)
drivers/net/phy/spi_ks8995.c +0 -1
index 116a2dd..4eb98bc 100644
@@ -348,7 +348,6 @@ static int __devexit ks8995_remove(struct spi_device *spi)
 static struct spi_driver ks8995_driver = {
 	.driver = {
 		.name	    = "spi-ks8995",
-		.bus	     = &spi_bus_type,
 		.owner	   = THIS_MODULE,
 	},
 	.probe	  = ks8995_probe,
Signature · 1 line
1.7.9.5
Acked-by on v1 4/4
#6 lore raw

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

2012.04.10. 22:51 keltezéssel, Lars-Peter Clausen írta:

Quoted 16 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_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 = {
drivers/net/phy/spi_ks8995.c +0 -1
-		.bus = &spi_bus_type,
	},
};

// </smpl>

Quoted 8 lines
Cc "David S. Miller" <[email protected]>
Cc Gabor Juhos <[email protected]>
Cc Frederic Lambert <[email protected]>
---
 drivers/net/phy/spi_ks8995.c |    1 -
 1 file changed, 1 deletion(-)
maintainer Applied
#7 lore raw

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

In reply to Lars-Peter Clausen

From: Lars-Peter Clausen <[email protected]>
Date: Tue, 10 Apr 2012 22:51:29 +0200

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_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 = {
drivers/net/phy/spi_ks8995.c +0 -1
-		.bus = &spi_bus_type,
	},
};
Quoted 3 lines

// </smpl>

Applied to net-next, thanks.