Commit cf2b191c authored by Linus Torvalds's avatar Linus Torvalds

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
parents 85b9df7a bdacd1b4
...@@ -324,7 +324,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) ...@@ -324,7 +324,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
{ {
int ret = -EPROBE_DEFER; int ret = -EPROBE_DEFER;
int local_trigger_count = atomic_read(&deferred_trigger_count); 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) { if (defer_all_probes) {
/* /*
...@@ -383,7 +384,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) ...@@ -383,7 +384,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
if (test_remove) { if (test_remove) {
test_remove = false; test_remove = false;
if (dev->bus && dev->bus->remove) if (dev->bus->remove)
dev->bus->remove(dev); dev->bus->remove(dev);
else if (drv->remove) else if (drv->remove)
drv->remove(dev); drv->remove(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment