diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:22:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:22:26 -0500 |
commit | f2aca47dc3c2d0c2d5dbd972558557e74232bbce (patch) | |
tree | eae58f599a25a1f3ab41bf616a2b7c4b3c6e2277 /drivers/base/dd.c | |
parent | 7677ced48e2bbbb8d847d34f37e5d96d2b0e41e4 (diff) | |
parent | b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (28 commits)
sysfs: Shadow directory support
Driver Core: Increase the default timeout value of the firmware subsystem
Driver core: allow to delay the uevent at device creation time
Driver core: add device_type to struct device
Driver core: add uevent vars for devices of a class
SYSFS: Fix missing include of list.h in sysfs.h
HOWTO: Add a reference to Harbison and Steele
sysfs: error handling in sysfs, fill_read_buffer()
kobject: kobject_put cleanup
sysfs: kobject_put cleanup
sysfs: suppress lockdep warnings
Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
driver core: Change function call order in device_bind_driver().
driver core: Don't stop probing on ->probe errors.
driver core fixes: device_register() retval check in platform.c
driver core fixes: make_class_name() retval checks
/sys/modules/*/holders
USB: add the sysfs driver name to all modules
SERIO: add the sysfs driver name to all modules
PCI: add the sysfs driver name to all modules
...
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 510e7884975f..b5bf243d9cd6 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -86,8 +86,12 @@ static void driver_sysfs_remove(struct device *dev) | |||
86 | */ | 86 | */ |
87 | int device_bind_driver(struct device *dev) | 87 | int device_bind_driver(struct device *dev) |
88 | { | 88 | { |
89 | driver_bound(dev); | 89 | int ret; |
90 | return driver_sysfs_add(dev); | 90 | |
91 | ret = driver_sysfs_add(dev); | ||
92 | if (!ret) | ||
93 | driver_bound(dev); | ||
94 | return ret; | ||
91 | } | 95 | } |
92 | 96 | ||
93 | struct stupid_thread_structure { | 97 | struct stupid_thread_structure { |
@@ -136,18 +140,17 @@ probe_failed: | |||
136 | driver_sysfs_remove(dev); | 140 | driver_sysfs_remove(dev); |
137 | dev->driver = NULL; | 141 | dev->driver = NULL; |
138 | 142 | ||
139 | if (ret == -ENODEV || ret == -ENXIO) { | 143 | if (ret != -ENODEV && ret != -ENXIO) { |
140 | /* Driver matched, but didn't support device | ||
141 | * or device not found. | ||
142 | * Not an error; keep going. | ||
143 | */ | ||
144 | ret = 0; | ||
145 | } else { | ||
146 | /* driver matched but the probe failed */ | 144 | /* driver matched but the probe failed */ |
147 | printk(KERN_WARNING | 145 | printk(KERN_WARNING |
148 | "%s: probe of %s failed with error %d\n", | 146 | "%s: probe of %s failed with error %d\n", |
149 | drv->name, dev->bus_id, ret); | 147 | drv->name, dev->bus_id, ret); |
150 | } | 148 | } |
149 | /* | ||
150 | * Ignore errors returned by ->probe so that the next driver can try | ||
151 | * its luck. | ||
152 | */ | ||
153 | ret = 0; | ||
151 | done: | 154 | done: |
152 | kfree(data); | 155 | kfree(data); |
153 | atomic_dec(&probe_count); | 156 | atomic_dec(&probe_count); |