From: Johannes Berg <johannes@sipsolutions.net>
To: linux-kernel@vger.kernel.org
Cc: linux1394-devel@lists.sourceforge.net
Subject: [RFC 1/4] firewire: node interface
Date: Thu, 02 Feb 2006 23:38:00 +0100 [thread overview]
Message-ID: <1138919880.3621.15.camel@localhost> (raw)
In-Reply-To: <1138919238.3621.12.camel@localhost>
This patch adds just two small helper functions to allow other code to
register a struct class_interface to interface node entries.
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 082c7fd..06f4544 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1796,3 +1796,11 @@ void cleanup_ieee1394_nodemgr(void)
class_unregister(&nodemgr_ud_class);
class_unregister(&nodemgr_ne_class);
}
+
+int hpsb_register_node_interface(struct class_interface *intf)
+{
+ intf->class = &nodemgr_ne_class;
+
+ return class_interface_register(intf);
+}
+EXPORT_SYMBOL_GPL(hpsb_register_node_interface);
diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h
index 0b26616..d779f81 100644
--- a/drivers/ieee1394/nodemgr.h
+++ b/drivers/ieee1394/nodemgr.h
@@ -170,6 +170,14 @@ int hpsb_node_write(struct node_entry *n
int hpsb_node_lock(struct node_entry *ne, u64 addr,
int extcode, quadlet_t *data, quadlet_t arg);
+/*
+ * things like mem1394 are interfaces to nodes, thus
+ * allow them to register and unregister one.
+ */
+int hpsb_register_node_interface(struct class_interface *intf);
+static inline void hpsb_unregister_node_interface(struct class_interface *intf) {
+ class_interface_unregister(intf);
+}
/* Iterate the hosts, calling a given function with supplied data for each
* host. */
next prev parent reply other threads:[~2006-02-02 22:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 22:27 [RFC 0/4] firewire: interface to remote memory (mem1394) Johannes Berg
2006-02-02 22:38 ` Johannes Berg [this message]
2006-02-02 22:40 ` [RFC 2/4] firewire: dynamic cdev allocation below firewire major Johannes Berg
2006-02-05 13:11 ` Stefan Richter
2006-02-13 3:51 ` Jody McIntyre
2006-02-13 7:32 ` Arjan van de Ven
2006-02-13 12:02 ` Johannes Berg
2006-02-13 16:49 ` Stefan Richter
2006-02-13 21:10 ` Arjan van de Ven
2006-02-14 15:41 ` Johannes Berg
2006-02-02 22:41 ` [RFC 3/4] firewire: unconditionally export hpsb_send_packet_and_wait Johannes Berg
2006-02-05 13:42 ` Stefan Richter
2006-02-07 10:45 ` Johannes Berg
2006-02-02 22:43 ` [RFC 4/4] firewire: add mem1394 Johannes Berg
2006-02-03 11:35 ` Andy Wingo
2006-02-03 11:47 ` Johannes Berg
2006-02-05 12:59 ` Stefan Richter
2006-02-05 8:43 ` Andrew Morton
2006-02-05 9:09 ` Kyle Moffett
[not found] ` <43E5D599.5040503@s5r6.in-berlin.de>
2006-02-05 20:09 ` Stefan Richter
2006-02-05 20:17 ` Andi Kleen
2006-02-05 20:50 ` Stefan Richter
2006-02-06 8:44 ` Andi Kleen
2006-02-05 14:19 ` Stefan Richter
2006-02-07 10:41 ` Johannes Berg
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=1138919880.3621.15.camel@localhost \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.