diff mbox

rps: Fix build with CONFIG_SYSFS enabled

Message ID alpine.DEB.1.00.1003221355380.25849@pokey.mtv.corp.google.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Tom Herbert March 22, 2010, 8:57 p.m. UTC
Fix build with CONFIG_SYSFS not enabled.


Signed-off-by: Tom Herbert <therbert@google.com>
---

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

Comments

Randy Dunlap March 22, 2010, 9:48 p.m. UTC | #1
On 03/22/10 13:57, Tom Herbert wrote:
> Fix build with CONFIG_SYSFS not enabled.
> 
> 
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index 7a46343..f6b6bfe 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -739,7 +739,9 @@ void netdev_unregister_kobject(struct net_device * net)
>  	if (!net_eq(dev_net(net), &init_net))
>  		return;
>  
> +#ifdef CONFIG_SYSFS
>  	rx_queue_remove_kobjects(net);
> +#endif
>  
>  	device_del(dev);
>  }
> @@ -780,11 +782,13 @@ int netdev_register_kobject(struct net_device *net)
>  	if (error)
>  		return error;
>  
> +#ifdef CONFIG_SYSFS
>  	error = rx_queue_register_kobjects(net);
>  	if (error) {
>  		device_del(dev);
>  		return error;
>  	}
> +#endif
>  
>  	return error;
>  }
> 
> --

Dave, this patch and Eric's patch both build OK.  Your choice...
David Miller March 23, 2010, 1:07 a.m. UTC | #2
From: Tom Herbert <therbert@google.com>
Date: Mon, 22 Mar 2010 13:57:56 -0700 (PDT)

> Fix build with CONFIG_SYSFS not enabled.
> 
> Signed-off-by: Tom Herbert <therbert@google.com>

Applied, thanks everyone.
--
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 23, 2010, 1:07 a.m. UTC | #3
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Mon, 22 Mar 2010 14:48:47 -0700

> Dave, this patch and Eric's patch both build OK.  Your choice...

Yep, I took Tom's, thanks for testing Randy.
--
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/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 7a46343..f6b6bfe 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -739,7 +739,9 @@  void netdev_unregister_kobject(struct net_device * net)
 	if (!net_eq(dev_net(net), &init_net))
 		return;
 
+#ifdef CONFIG_SYSFS
 	rx_queue_remove_kobjects(net);
+#endif
 
 	device_del(dev);
 }
@@ -780,11 +782,13 @@  int netdev_register_kobject(struct net_device *net)
 	if (error)
 		return error;
 
+#ifdef CONFIG_SYSFS
 	error = rx_queue_register_kobjects(net);
 	if (error) {
 		device_del(dev);
 		return error;
 	}
+#endif
 
 	return error;
 }