netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add ability to register class interfaces for network class
@ 2004-10-26 18:35 Timo Teräs
  2004-10-26 18:48 ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Timo Teräs @ 2004-10-26 18:35 UTC (permalink / raw)
  To: davem; +Cc: netdev

Add functions to register class interfaces for network class.
Similar to the ones found in scsi subsystem.

Originally posted on linux-net and related discussion can be found
from http://marc.theaimsgroup.com/?l=linux-net&m=109758592121767&w=2.

Signed-off-by: Timo Teräs <ext-timo.teras@nokia.com>

--- linux-2.6.9-rc4.orig/net/core/net-sysfs.c	2004-10-12 13:23:35.106496312 +0300
+++ linux-2.6.9-rc4/net/core/net-sysfs.c	2004-10-12 13:24:29.177276304 +0300
@@ -448,3 +448,11 @@
  {
  	return class_register(&net_class);
  }
+
+int netdev_register_interface(struct class_interface *intf)
+{
+	intf->class = &net_class;
+	return class_interface_register(intf);
+}
+
+EXPORT_SYMBOL_GPL(netdev_register_interface);
--- linux-2.6.9-rc4.orig/include/linux/netdevice.h	2004-10-12 13:23:31.186092304 +0300
+++ linux-2.6.9-rc4/include/linux/netdevice.h	2004-10-12 13:24:29.179276000 +0300
@@ -951,6 +951,12 @@
  extern char *net_sysctl_strdup(const char *s);
  #endif

+#ifdef CONFIG_SYSFS
+extern int netdev_register_interface(struct class_interface *intf);
+#define netdev_unregister_interface(intf) \
+	class_interface_unregister(intf)
+#endif
+
  #endif /* __KERNEL__ */

  #endif	/* _LINUX_DEV_H */

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-10-27 19:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-26 18:35 [PATCH] Add ability to register class interfaces for network class Timo Teräs
2004-10-26 18:48 ` Christoph Hellwig
2004-10-26 20:52   ` Teras Timo (EXT-YomiGroup/Helsinki)
2004-10-27 11:13     ` ext Christoph Hellwig
2004-10-27 11:31       ` Timo Teräs
2004-10-27 15:59         ` Stephen Hemminger
2004-10-27 18:38           ` Teras Timo (EXT-YomiGroup/Helsinki)
2004-10-27 18:55             ` Stephen Hemminger
2004-10-27 19:20               ` Teras Timo (EXT-YomiGroup/Helsinki)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).