linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] can: mcp251x: Remove redundant spi driver bus initialization
@ 2013-03-12 12:13 Lars-Peter Clausen
  2013-03-12 12:13 ` [PATCH 2/3] can: mcp251x: Use module_spi_driver Lars-Peter Clausen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2013-03-12 12:13 UTC (permalink / raw)
  To: Marc Kleine-Budde, Wolfgang Grandegger; +Cc: linux-can, 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>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/mcp251x.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index f32b9fc..05e93e8 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -1207,7 +1207,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,
 	},
 
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-12 12:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 12:13 [PATCH 1/3] can: mcp251x: Remove redundant spi driver bus initialization Lars-Peter Clausen
2013-03-12 12:13 ` [PATCH 2/3] can: mcp251x: Use module_spi_driver Lars-Peter Clausen
2013-03-12 12:13 ` [PATCH 3/3] can: mcp251x: Use dev_pm_ops Lars-Peter Clausen
2013-03-12 12:20 ` [PATCH 1/3] can: mcp251x: Remove redundant spi driver bus initialization Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).