diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-08-27 01:24:25 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-02-24 14:51:27 +0100 |
commit | 9c939e4df432fe4ed17bdbf7bc14111ec51ef7c9 (patch) | |
tree | 4d9efdfbd05ca34ae12bddd7ec14077b3b9339a3 | |
parent | b33fdd6ca576d6c476c6aebf350d4556294d74ac (diff) | |
download | linux-9c939e4df432fe4ed17bdbf7bc14111ec51ef7c9.tar.gz linux-9c939e4df432fe4ed17bdbf7bc14111ec51ef7c9.tar.bz2 linux-9c939e4df432fe4ed17bdbf7bc14111ec51ef7c9.zip |
ieee1394: inherit ud vendor_id from node vendor_id
While Module_Vendor_ID in the configuration ROM's root directory is
mandatory, there often aren't vendor IDs in unit directories. This
affects the new firedtv driver which is meant to be auto-loaded and
matched only for vendor-specific devices.
We now always copy ne->vendor_id into ud->vendor_id before we scan a
unit directory (and fill in a possibly present vendor ID from there).
This way, the root directory's vendor ID is used as fallback in the
"uevent" environment for modprobe'ing per module alias when a node was
plugged in, and in the driver match routine when protocol drivers are
bound to unit directories. It will however not be used as sysfs
attribute of a unit directory device.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r-- | drivers/ieee1394/nodemgr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index f47b6f69d2a9..53aada5bbe1e 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -971,6 +971,9 @@ static struct unit_directory *nodemgr_process_unit_directory ud->ud_kv = ud_kv; ud->id = (*id)++; + /* inherit vendor_id from root directory if none exists in unit dir */ + ud->vendor_id = ne->vendor_id; + csr1212_for_each_dir_entry(ne->csr, kv, ud_kv, dentry) { switch (kv->key.id) { case CSR1212_KV_ID_VENDOR: |