Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1499168

[PATCH 1/2] driver core: skip removal test for non-removable drivers

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 1/2] driver core: skip removal test for non-removable drivers
Date 2016-10-11 21:50 +0200
Message-ID <srbdL-2oc-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Some drivers do not support removal/unbinding. These drivers should have
drv->suppress_bind_attrs set to true, so use that to skip the removal
test.

This doesn't fix anything reported so far, but should prevent some other
cases. Some drivers will need fixes to set suppress_bind_attrs to avoid
this test.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177021
Fixes: bea5b158ff0d ("driver core: add test of driver remove calls during probe")
Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/base/dd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index d22a7260f42b..8937a7ad7165 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -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) {
 		/*
-- 
2.10.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] driver core: skip removal test for non-removable drivers Rob Herring <robh@kernel.org> - 2016-10-11 21:50 +0200
  [PATCH 2/2] driver core: fix smatch warning on dev->bus check Rob Herring <robh@kernel.org> - 2016-10-11 21:50 +0200
  Re: [PATCH 1/2] driver core: skip removal test for non-removable  drivers Laszlo Ersek <lersek@redhat.com> - 2016-10-12 09:20 +0200

csiph-web