mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
driver core fixes for 4.9-rc5
Here are two driver core fixes for 4.9-rc5. The first resolves an issue with some drivers not liking to be unbound and bound again (if CONFIG_DEBUG_TEST_DRIVER_REMOVE is enabled), which solves some reported problems with graphics and storage drivers. The other resolves a smatch error with the 4.9-rc1 driver core changes around this feature. Both have been in linux-next with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iFYEABECABYFAlgoLEcPHGdyZWdAa3JvYWguY29tAAoJEDFH1A3bLfspP1EAn1Du ApNAA8R5xV4dwjlXrPkUy6bbAKCBo8o29mnUw4/SN75ipl+ACoDC4g== =MM3q -----END PGP SIGNATURE----- Merge tag 'driver-core-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver core fixes for 4.9-rc5. The first resolves an issue with some drivers not liking to be unbound and bound again (if CONFIG_DEBUG_TEST_DRIVER_REMOVE is enabled), which solves some reported problems with graphics and storage drivers. The other resolves a smatch error with the 4.9-rc1 driver core changes around this feature. Both have been in linux-next with no reported issues" * tag 'driver-core-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: fix smatch warning on dev->bus check driver core: skip removal test for non-removable drivers
This commit is contained in:
commit
cf2b191cba
@ -324,7 +324,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
|
||||
{
|
||||
int ret = -EPROBE_DEFER;
|
||||
int local_trigger_count = atomic_read(&deferred_trigger_count);
|
||||
bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE);
|
||||
bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE) &&
|
||||
!drv->suppress_bind_attrs;
|
||||
|
||||
if (defer_all_probes) {
|
||||
/*
|
||||
@ -383,7 +384,7 @@ re_probe:
|
||||
if (test_remove) {
|
||||
test_remove = false;
|
||||
|
||||
if (dev->bus && dev->bus->remove)
|
||||
if (dev->bus->remove)
|
||||
dev->bus->remove(dev);
|
||||
else if (drv->remove)
|
||||
drv->remove(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user