aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
authorBen Collins <ben.collins@ubuntu.com>2006-11-23 13:59:48 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 17:11:55 -0500
commited30c26ee809b060f437fd9f1b3453e1d0375e32 (patch)
tree00daeacae861f1a544ed346d5ce4f26700f8f6ba /drivers/ieee1394/nodemgr.c
parent9b7d9c096dd4e4baacc21b2588662bbb56f36c4e (diff)
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.c')
-rw-r--r--drivers/ieee1394/nodemgr.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index d2a543972c8d..2953aebf4ef1 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1282,12 +1282,19 @@ static int nodemgr_uevent(struct class_device *cdev, char **envp, int num_envp,
1282#endif /* CONFIG_HOTPLUG */ 1282#endif /* CONFIG_HOTPLUG */
1283 1283
1284 1284
1285int hpsb_register_protocol(struct hpsb_protocol_driver *driver) 1285int __hpsb_register_protocol(struct hpsb_protocol_driver *drv,
1286 struct module *owner)
1286{ 1287{
1288 int error;
1289
1290 drv->driver.bus = &ieee1394_bus_type;
1291 drv->driver.owner = owner;
1292 drv->driver.name = drv->name;
1293
1287 /* This will cause a probe for devices */ 1294 /* This will cause a probe for devices */
1288 int error = driver_register(&driver->driver); 1295 error = driver_register(&drv->driver);
1289 if (!error) 1296 if (!error)
1290 nodemgr_create_drv_files(driver); 1297 nodemgr_create_drv_files(drv);
1291 return error; 1298 return error;
1292} 1299}
1293 1300