]> git.baikalelectronics.ru Git - kernel.git/commit
Dynamic ID addition doesn't need get_driver()
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 24 Jan 2012 18:34:41 +0000 (13:34 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 25 Jan 2012 00:00:35 +0000 (16:00 -0800)
commit90ea5e809fcde4cf88ea14a842b6f0083e4ac8bb
tree45923c4dec748e82a05313c9c7d443aa11e02a5f
parent6e9d9be4f51f3c24f8d3037485d8d6beeefb058b
Dynamic ID addition doesn't need get_driver()

As part of the removal of get_driver()/put_driver(), this patch
(as1511) changes all the places that add dynamic IDs for drivers.
Since these additions are done by writing to the drivers' sysfs
attribute files, and the attributes are removed when the drivers are
unregistered, there is no reason to take an extra reference to the
drivers.

The one exception is the pci-stub driver, which calls pci_add_dynid()
as part of its registration.  But again, there's no reason to take an
extra reference here, because the driver can't be unloaded while it is
being registered.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jiri Kosina <jkosina@suse.cz>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hid/hid-core.c
drivers/pci/pci-driver.c
drivers/pcmcia/ds.c
drivers/usb/core/driver.c