Skip to content

Commit

Permalink
ieee1394: prevent device binding of raw1394, video1394, dv1394
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Richter committed Apr 18, 2008
1 parent 63995d4 commit d2ace29
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/ieee1394/dv1394.c
Original file line number Diff line number Diff line change
@@ -2179,8 +2179,7 @@ static struct ieee1394_device_id dv1394_id_table[] = {
MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table);

static struct hpsb_protocol_driver dv1394_driver = {
.name = "dv1394",
.id_table = dv1394_id_table,
.name = "dv1394",
};


6 changes: 5 additions & 1 deletion drivers/ieee1394/nodemgr.c
Original file line number Diff line number Diff line change
@@ -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;
1 change: 0 additions & 1 deletion drivers/ieee1394/raw1394.c
Original file line number Diff line number Diff line change
@@ -2959,7 +2959,6 @@ MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table);

static struct hpsb_protocol_driver raw1394_driver = {
.name = "raw1394",
.id_table = raw1394_id_table,
};

/******************************************************************************/
3 changes: 1 addition & 2 deletions drivers/ieee1394/video1394.c
Original file line number Diff line number Diff line change
@@ -1315,8 +1315,7 @@ static struct ieee1394_device_id video1394_id_table[] = {
MODULE_DEVICE_TABLE(ieee1394, video1394_id_table);

static struct hpsb_protocol_driver video1394_driver = {
.name = VIDEO1394_DRIVER_NAME,
.id_table = video1394_id_table,
.name = VIDEO1394_DRIVER_NAME,
};


0 comments on commit d2ace29

Please sign in to comment.