diff options
author | Ben Collins <ben.collins@ubuntu.com> | 2006-11-23 18:59:48 (GMT) |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-12-07 22:11:55 (GMT) |
commit | ed30c26ee809b060f437fd9f1b3453e1d0375e32 (patch) | |
tree | 00daeacae861f1a544ed346d5ce4f26700f8f6ba /drivers/ieee1394/nodemgr.h | |
parent | 9b7d9c096dd4e4baacc21b2588662bbb56f36c4e (diff) | |
download | linux-ed30c26ee809b060f437fd9f1b3453e1d0375e32.tar.xz |
ieee1394: Consolidate driver registering
This patch consolidates some bookkeeping for driver registering. It
closely models what pci_register_driver() does. The main addition is
that the owner of the driver is set, so we get a proper symlink
for /sys/bus/ieee1394/driver/*/module.
Also moves setting of name and bus type into nodemgr. Because of this,
we can remove the EXPORT_SYMBOL for ieee1394_bus_type, since it's now
only used in ieee1394.ko.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/nodemgr.h')
-rw-r--r-- | drivers/ieee1394/nodemgr.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h index 0e1e7d9..e25cbad 100644 --- a/drivers/ieee1394/nodemgr.h +++ b/drivers/ieee1394/nodemgr.h @@ -144,7 +144,12 @@ struct hpsb_protocol_driver { struct device_driver driver; }; -int hpsb_register_protocol(struct hpsb_protocol_driver *driver); +int __hpsb_register_protocol(struct hpsb_protocol_driver *, struct module *); +static inline int hpsb_register_protocol(struct hpsb_protocol_driver *driver) +{ + return __hpsb_register_protocol(driver, THIS_MODULE); +} + void hpsb_unregister_protocol(struct hpsb_protocol_driver *driver); static inline int hpsb_node_entry_valid(struct node_entry *ne) |