aboutsummaryrefslogtreecommitdiff
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-02-18 21:11:07 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 17:55:29 +0200
commitd2ace29fa44589da51fedc06a67b3f05301f3bfd (patch)
tree3790d77128ba48194af5ca667ba304d3047c1363 /drivers/ieee1394/nodemgr.c
parent63995d46506a774f5ddd6b51c017d42c3fbfaedb (diff)
ieee1394: prevent device binding of raw1394, video1394, dv1394
These drivers don't need to match any unit_directory type device. They just need the id_table for module autoloading per module alias. Not binding any of these drivers allows special-purpose drivers with similar or same IDs to bind to devices. This currently only benefits out-of-tree drivers; on the other hand it is in no way detrimental to in-tree drivers. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 511e4321c6b..70afa3786f3 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -701,7 +701,11 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
return 0;
driver = container_of(drv, struct hpsb_protocol_driver, driver);
- for (id = driver->id_table; id->match_flags != 0; id++) {
+ id = driver->id_table;
+ if (!id)
+ return 0;
+
+ for (; id->match_flags != 0; id++) {
if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
id->vendor_id != ud->vendor_id)
continue;