diff mbox

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

Message ID 1435071172-24542-1-git-send-email-borneo.antonio@gmail.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Antonio Borneo June 23, 2015, 2:52 p.m. UTC
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 <borneo.antonio@gmail.com>
To: Alan Ott <alan@signal11.us>
To: Alexander Aring <alex.aring@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>
To: linux-wpan@vger.kernel.org
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/ieee802154/cc2520.c   | 1 -
 drivers/net/ieee802154/mrf24j40.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Varka Bhadram June 23, 2015, 3:06 p.m. UTC | #1
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 <borneo.antonio@gmail.com>
> To: Alan Ott <alan@signal11.us>
> To: Alexander Aring <alex.aring@gmail.com>
> To: Varka Bhadram <varkabhadram@gmail.com>
> To: linux-wpan@vger.kernel.org
> To: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   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 <varkabhadram@gmail.com>

> 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,
Alan Ott June 23, 2015, 3:08 p.m. UTC | #2
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 <borneo.antonio@gmail.com>
> To: Alan Ott <alan@signal11.us>
> To: Alexander Aring <alex.aring@gmail.com>
> To: Varka Bhadram <varkabhadram@gmail.com>
> To: linux-wpan@vger.kernel.org
> To: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   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 <alan@signal11.us>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexander Aring July 13, 2015, 5:29 p.m. UTC | #3
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcel Holtmann July 14, 2015, 5:07 a.m. UTC | #4
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 <borneo.antonio@gmail.com>
> To: Alan Ott <alan@signal11.us>
> To: Alexander Aring <alex.aring@gmail.com>
> To: Varka Bhadram <varkabhadram@gmail.com>
> To: linux-wpan@vger.kernel.org
> To: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> 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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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,