summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-12-25 00:05:28 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:11 -0700
commit1d936fbca0b93dd9cc7a71983ca1a8ea890f181d (patch)
treec027151257ba747c394592836f8c138840a16e4c /namedev.c
parent47b3f983da53fe7a990c9e2eadd73d5eb261bbfd (diff)
[PATCH] If a CALLOUT rule has a BUS id, then we must check to see if the device is on a bus.
Thanks to Martin Schlemmer <azarah@nosferatu.za.org> for pointing this out.
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/namedev.c b/namedev.c
index e474b48e57..de1b206180 100644
--- a/namedev.c
+++ b/namedev.c
@@ -399,7 +399,10 @@ static int do_callout(struct sysfs_class_device *class_dev, struct udevice *udev
if (dev->type != CALLOUT)
continue;
- if (sysfs_device) {
+ if (dev->bus[0] != '\0') {
+ /* as the user specified a bus, we must match it up */
+ if (!sysfs_device)
+ continue;
dbg("dev->bus='%s' sysfs_device->bus='%s'", dev->bus, sysfs_device->bus);
if (strcasecmp(dev->bus, sysfs_device->bus) != 0)
continue;