linux/drivers
Ming Lei 49b420a13f driver core: check bus->match without holding device lock
This patch moves bus->match out from driver_probe_device and
does not hold device lock to check the match between a device
and a driver.

The idea has been verified by the commit 6cd4958609,
which leads to a faster boot. But the commit 6cd4958609 has
the following drawbacks: 1),only does the quick check in
the path of __driver_attach->driver_probe_device, not in other
paths; 2),for a matched device and driver, check the same match
twice. It is a waste of cpu ,especially for some drivers with long
device id table (eg. usb-storage driver).

This patch adds a helper of driver_match_device to check the match
in all paths, and testes the match only once.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:38:24 -07:00
..
accessibility
acpi
amba amba: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
ata
atm
auxdisplay
base driver core: check bus->match without holding device lock 2009-03-24 16:38:24 -07:00
block Merge commit 'gcl/merge' into merge 2009-03-18 13:16:30 +11:00
bluetooth
cdrom
char
clocksource
connector
cpufreq
cpuidle
crypto
dca Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-03-23 09:25:58 -07:00
dio dio: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
dma dma: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
edac edac: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
eisa eisa: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
firewire
firmware
gpio gpio: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:23 -07:00
gpu drm: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-03-19 14:50:15 -07:00
hwmon
i2c
ide
idle
ieee1394
infiniband
input
isdn bas_gigaset: correctly allocate USB interrupt transfer buffer 2009-03-18 23:44:23 -07:00
leds
lguest
macintosh
mca mca: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:23 -07:00
md
media v4l: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
memstick
message
mfd mfd: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:23 -07:00
misc
mmc mmc: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
mtd mtd: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
net wimax: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:23 -07:00
nubus
of
oprofile
parisc
parport
pci pci: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
pcmcia pcmcia: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
platform
pnp
power
ps3
rapidio rapidio: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
regulator
rtc rtc: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
s390 s390: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
sbus
scsi
serial serial: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
sh sh: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
sn
spi spi: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
ssb
staging Staging: benet: remove driver now that it is merged in drivers/net/ 2009-03-18 09:22:17 -07:00
tc tc: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:22 -07:00
telephony
thermal
uio
usb USB: FHCI: use dev_name() in place of bus_id. 2009-03-24 16:38:23 -07:00
uwb
video video: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
virtio
w1
watchdog
xen
zorro zorro: struct device - replace bus_id with dev_name(), dev_set_name() 2009-03-24 16:38:21 -07:00
Kconfig
Makefile