Skip to content

Commit

Permalink
rps: Fix build with CONFIG_SYSFS enabled
Browse files Browse the repository at this point in the history
Fix build with CONFIG_SYSFS not enabled.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tom Herbert authored and David S. Miller committed Mar 23, 2010
1 parent 70f60a2 commit e880eb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e880eb6

Please sign in to comment.