netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Timo Teräs" <ext-timo.teras@nokia.com>
To: davem@davemloft.net
Cc: netdev@oss.sgi.com
Subject: [PATCH] Add ability to register class interfaces for network class
Date: Tue, 26 Oct 2004 21:35:26 +0300	[thread overview]
Message-ID: <20041026183526.GA23535@two.research.nokia.com> (raw)

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

             reply	other threads:[~2004-10-26 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-26 18:35 Timo Teräs [this message]
2004-10-26 18:48 ` [PATCH] Add ability to register class interfaces for network class 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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041026183526.GA23535@two.research.nokia.com \
    --to=ext-timo.teras@nokia.com \
    --cc=davem@davemloft.net \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).