rps: Fix build with CONFIG_SYSFS enabled
authorTom Herbert <therbert@google.com>
Tue, 23 Mar 2010 01:06:47 +0000 (18:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Mar 2010 01:06:47 +0000 (18:06 -0700)
Fix build with CONFIG_SYSFS not enabled.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c

index 7a46343d5ae33ae9d8466ed2a43cb2174568c881..f6b6bfee72ae3ae0eb4e6925a1e49faa44483fd3 100644 (file)
@@ -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;
 }