kernel-hacking-2024-linux-s.../drivers/base
Alan Stern 2023c610dc Driver core: add new device to bus's list before probing
This patch (as1271) affects when new devices get linked into their
bus's list of devices.  Currently this happens after probing, and it
doesn't happen at all if probing fails.  Clearly this is wrong,
because at that point quite a few symbolic links have already been
created in sysfs.  We are committed to adding the device, so it should
be linked into the bus's list regardless.

In addition, this needs to happen before the uevent announcing the new
device gets issued.  Otherwise user programs might try to access the
device before it has been added to the bus.

To fix both these problems, the patch moves the call to
klist_add_tail() forward from bus_attach_device() to bus_add_device().
Since bus_attach_device() now does nothing but probe for drivers, it
has been renamed to bus_probe_device().  And lastly, the kerneldoc is
updated.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 09:50:46 -07:00
..
power PM: Reset transition_started at dpm_resume_noirq 2009-09-14 20:27:00 +02:00
attribute_container.c
base.h Driver core: add new device to bus's list before probing 2009-09-15 09:50:46 -07:00
bus.c Driver core: add new device to bus's list before probing 2009-09-15 09:50:46 -07:00
class.c
core.c Driver core: add new device to bus's list before probing 2009-09-15 09:50:46 -07:00
cpu.c cpumask: use new cpumask_ functions in core code. 2009-03-30 22:05:16 +10:30
dd.c PM: Introduce core framework for run-time PM of I/O devices (rev. 17) 2009-08-23 00:04:44 +02:00
devres.c devres: WARN() and return, don't crash on device_del() of uninitialized device 2009-07-12 13:02:09 -07:00
dma-mapping.c
driver.c Driver Core: do not oops when driver_unregister() is called for unregistered drivers 2009-05-28 14:24:07 -07:00
firmware.c
firmware_class.c driver core: firmware_class:fix memory leak of page pointers array 2009-07-28 13:45:22 -07:00
hypervisor.c
init.c
iommu.c drivers/base/iommu.c: add missing includes 2009-05-06 16:36:10 -07:00
isa.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
Kconfig
Makefile
map.c
memory.c
module.c
node.c mm: remove CONFIG_UNEVICTABLE_LRU config option 2009-06-16 19:47:42 -07:00
platform.c PM: Run-time PM platform device bus support 2009-08-23 00:05:31 +02:00
sys.c driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails 2009-07-28 13:45:22 -07:00
topology.c
transport_class.c