Patchwork [25/77] usbnet: convert hso driver to net_device_ops

login
register
mail settings
Submitter stephen hemminger
Date March 21, 2009, 5:35 a.m.
Message ID <20090321053714.437968008@vyatta.com>
Download mbox | patch
Permalink /patch/24845/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - March 21, 2009, 5:35 a.m.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
David Brownell - March 21, 2009, 9:08 a.m.
On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd the driver's maintainer


> --- a/drivers/net/usb/hso.c	2009-03-09 08:23:41.851308905 -0700
> +++ b/drivers/net/usb/hso.c	2009-03-20 08:35:11.089026883 -0700
> @@ -2428,6 +2428,13 @@ static void hso_free_net_device(struct h
>  	kfree(hso_dev);
>  }
>  
> +static const struct net_device_ops hso_netdev_ops = {
> +	.ndo_open	= hso_net_open,
> +	.ndo_stop	= hso_net_close,
> +	.ndo_start_xmit = hso_net_start_xmit,
> +	.ndo_tx_timeout = hso_net_tx_timeout,
> +};
> +
>  /* initialize the network interface */
>  static void hso_net_init(struct net_device *net)
>  {
> @@ -2436,10 +2443,7 @@ static void hso_net_init(struct net_devi
>  	D1("sizeof hso_net is %d", (int)sizeof(*hso_net));
>  
>  	/* fill in the other fields */
> -	net->open = hso_net_open;
> -	net->stop = hso_net_close;
> -	net->hard_start_xmit = hso_net_start_xmit;
> -	net->tx_timeout = hso_net_tx_timeout;
> +	net->netdev_ops = &hso_netdev_ops;
>  	net->watchdog_timeo = HSO_NET_TX_TIMEOUT;
>  	net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
>  	net->type = ARPHRD_NONE;
> 
> -- 
> 
> 


--
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
David Miller - March 22, 2009, 2:45 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:52 -0700

> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--
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

Patch

--- a/drivers/net/usb/hso.c	2009-03-09 08:23:41.851308905 -0700
+++ b/drivers/net/usb/hso.c	2009-03-20 08:35:11.089026883 -0700
@@ -2428,6 +2428,13 @@  static void hso_free_net_device(struct h
 	kfree(hso_dev);
 }
 
+static const struct net_device_ops hso_netdev_ops = {
+	.ndo_open	= hso_net_open,
+	.ndo_stop	= hso_net_close,
+	.ndo_start_xmit = hso_net_start_xmit,
+	.ndo_tx_timeout = hso_net_tx_timeout,
+};
+
 /* initialize the network interface */
 static void hso_net_init(struct net_device *net)
 {
@@ -2436,10 +2443,7 @@  static void hso_net_init(struct net_devi
 	D1("sizeof hso_net is %d", (int)sizeof(*hso_net));
 
 	/* fill in the other fields */
-	net->open = hso_net_open;
-	net->stop = hso_net_close;
-	net->hard_start_xmit = hso_net_start_xmit;
-	net->tx_timeout = hso_net_tx_timeout;
+	net->netdev_ops = &hso_netdev_ops;
 	net->watchdog_timeo = HSO_NET_TX_TIMEOUT;
 	net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
 	net->type = ARPHRD_NONE;