diff mbox

[06/77] irda: net_device_ops ioctl fix

Message ID 20090321053713.012084771@vyatta.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

stephen hemminger March 21, 2009, 5:35 a.m. UTC
Need to reference net_device_ops not old pointer.

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


---
 net/irda/irda_device.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

David Miller March 22, 2009, 2:34 a.m. UTC | #1
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:33 -0700

> Need to reference net_device_ops not old pointer.
> 
> 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
Samuel Ortiz March 23, 2009, 11:33 a.m. UTC | #2
Thanks Stephen...

On Fri, Mar 20, 2009 at 10:35:33PM -0700, Stephen Hemminger wrote:
> Need to reference net_device_ops not old pointer.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
 
> 
> ---
>  net/irda/irda_device.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/net/irda/irda_device.c	2009-03-19 22:40:30.469964248 -0700
> +++ b/net/irda/irda_device.c	2009-03-19 22:42:44.867089916 -0700
> @@ -149,13 +149,14 @@ int irda_device_is_receiving(struct net_
>  
>  	IRDA_DEBUG(2, "%s()\n", __func__);
>  
> -	if (!dev->do_ioctl) {
> +	if (!dev->netdev_ops->ndo_do_ioctl) {
>  		IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
>  			   __func__);
>  		return -1;
>  	}
>  
> -	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCGRECEIVING);
> +	ret = (dev->netdev_ops->ndo_do_ioctl)(dev, (struct ifreq *) &req,
> +					      SIOCGRECEIVING);
>  	if (ret < 0)
>  		return ret;
>  
> 
> --
Samuel Ortiz March 23, 2009, 11:33 a.m. UTC | #3
On Fri, Mar 20, 2009 at 10:35:33PM -0700, Stephen Hemminger wrote:
> Need to reference net_device_ops not old pointer.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> ---
>  net/irda/irda_device.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/net/irda/irda_device.c	2009-03-19 22:40:30.469964248 -0700
> +++ b/net/irda/irda_device.c	2009-03-19 22:42:44.867089916 -0700
> @@ -149,13 +149,14 @@ int irda_device_is_receiving(struct net_
>  
>  	IRDA_DEBUG(2, "%s()\n", __func__);
>  
> -	if (!dev->do_ioctl) {
> +	if (!dev->netdev_ops->ndo_do_ioctl) {
>  		IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
>  			   __func__);
>  		return -1;
>  	}
>  
> -	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCGRECEIVING);
> +	ret = (dev->netdev_ops->ndo_do_ioctl)(dev, (struct ifreq *) &req,
> +					      SIOCGRECEIVING);
>  	if (ret < 0)
>  		return ret;
>  
> 
> --
diff mbox

Patch

--- a/net/irda/irda_device.c	2009-03-19 22:40:30.469964248 -0700
+++ b/net/irda/irda_device.c	2009-03-19 22:42:44.867089916 -0700
@@ -149,13 +149,14 @@  int irda_device_is_receiving(struct net_
 
 	IRDA_DEBUG(2, "%s()\n", __func__);
 
-	if (!dev->do_ioctl) {
+	if (!dev->netdev_ops->ndo_do_ioctl) {
 		IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
 			   __func__);
 		return -1;
 	}
 
-	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCGRECEIVING);
+	ret = (dev->netdev_ops->ndo_do_ioctl)(dev, (struct ifreq *) &req,
+					      SIOCGRECEIVING);
 	if (ret < 0)
 		return ret;