diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-14 08:09:03 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-14 08:09:03 -0500 |
| commit | c7334ce814f7e5d8fc1f9b3126cda0640c2f81b3 (patch) | |
| tree | 91badef5266d0c92506c4af63b1ddb46de02b75c | |
| parent | a121103c922847ba5010819a3f250f1f7fc84ab8 (diff) | |
Revert "driver core: Add deferred_probe attribute to devices in sysfs"
This reverts commit 6751667a29d6fd64afb9ce30567ad616b68ed789.
Rob Herring objected to it, and a replacement for it will be added using
debugfs in the future.
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | Documentation/ABI/testing/sysfs-devices-deferred_probe | 12 | ||||
| -rw-r--r-- | drivers/base/base.h | 2 | ||||
| -rw-r--r-- | drivers/base/core.c | 7 | ||||
| -rw-r--r-- | drivers/base/dd.c | 13 |
4 files changed, 0 insertions, 34 deletions
diff --git a/Documentation/ABI/testing/sysfs-devices-deferred_probe b/Documentation/ABI/testing/sysfs-devices-deferred_probe deleted file mode 100644 index 58553d7a321f..000000000000 --- a/Documentation/ABI/testing/sysfs-devices-deferred_probe +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | What: /sys/devices/.../deferred_probe | ||
| 2 | Date: August 2016 | ||
| 3 | Contact: Ben Hutchings <ben.hutchings@codethink.co.uk> | ||
| 4 | Description: | ||
| 5 | The /sys/devices/.../deferred_probe attribute is | ||
| 6 | present for all devices. If a driver detects during | ||
| 7 | probing a device that a related device is not yet | ||
| 8 | ready, it may defer probing of the first device. The | ||
| 9 | kernel will retry probing the first device after any | ||
| 10 | other device is successfully probed. This attribute | ||
| 11 | reads as 1 if probing of this device is currently | ||
| 12 | deferred, or 0 otherwise. | ||
diff --git a/drivers/base/base.h b/drivers/base/base.h index ada9dce34e6d..e19b1008e5fb 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h | |||
| @@ -141,8 +141,6 @@ extern void device_unblock_probing(void); | |||
| 141 | extern struct kset *devices_kset; | 141 | extern struct kset *devices_kset; |
| 142 | extern void devices_kset_move_last(struct device *dev); | 142 | extern void devices_kset_move_last(struct device *dev); |
| 143 | 143 | ||
| 144 | extern struct device_attribute dev_attr_deferred_probe; | ||
| 145 | |||
| 146 | #if defined(CONFIG_MODULES) && defined(CONFIG_SYSFS) | 144 | #if defined(CONFIG_MODULES) && defined(CONFIG_SYSFS) |
| 147 | extern void module_add_driver(struct module *mod, struct device_driver *drv); | 145 | extern void module_add_driver(struct module *mod, struct device_driver *drv); |
| 148 | extern void module_remove_driver(struct device_driver *drv); | 146 | extern void module_remove_driver(struct device_driver *drv); |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 020ea7f05520..8c25e68e67d7 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
| @@ -1060,14 +1060,8 @@ static int device_add_attrs(struct device *dev) | |||
| 1060 | goto err_remove_dev_groups; | 1060 | goto err_remove_dev_groups; |
| 1061 | } | 1061 | } |
| 1062 | 1062 | ||
| 1063 | error = device_create_file(dev, &dev_attr_deferred_probe); | ||
| 1064 | if (error) | ||
| 1065 | goto err_remove_online; | ||
| 1066 | |||
| 1067 | return 0; | 1063 | return 0; |
| 1068 | 1064 | ||
| 1069 | err_remove_online: | ||
| 1070 | device_remove_file(dev, &dev_attr_online); | ||
| 1071 | err_remove_dev_groups: | 1065 | err_remove_dev_groups: |
| 1072 | device_remove_groups(dev, dev->groups); | 1066 | device_remove_groups(dev, dev->groups); |
| 1073 | err_remove_type_groups: | 1067 | err_remove_type_groups: |
| @@ -1085,7 +1079,6 @@ static void device_remove_attrs(struct device *dev) | |||
| 1085 | struct class *class = dev->class; | 1079 | struct class *class = dev->class; |
| 1086 | const struct device_type *type = dev->type; | 1080 | const struct device_type *type = dev->type; |
| 1087 | 1081 | ||
| 1088 | device_remove_file(dev, &dev_attr_deferred_probe); | ||
| 1089 | device_remove_file(dev, &dev_attr_online); | 1082 | device_remove_file(dev, &dev_attr_online); |
| 1090 | device_remove_groups(dev, dev->groups); | 1083 | device_remove_groups(dev, dev->groups); |
| 1091 | 1084 | ||
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index a8b258e5407b..a1fbf55c4d3a 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
| @@ -53,19 +53,6 @@ static LIST_HEAD(deferred_probe_pending_list); | |||
| 53 | static LIST_HEAD(deferred_probe_active_list); | 53 | static LIST_HEAD(deferred_probe_active_list); |
| 54 | static atomic_t deferred_trigger_count = ATOMIC_INIT(0); | 54 | static atomic_t deferred_trigger_count = ATOMIC_INIT(0); |
| 55 | 55 | ||
| 56 | static ssize_t deferred_probe_show(struct device *dev, | ||
| 57 | struct device_attribute *attr, char *buf) | ||
| 58 | { | ||
| 59 | bool value; | ||
| 60 | |||
| 61 | mutex_lock(&deferred_probe_mutex); | ||
| 62 | value = !list_empty(&dev->p->deferred_probe); | ||
| 63 | mutex_unlock(&deferred_probe_mutex); | ||
| 64 | |||
| 65 | return sprintf(buf, "%d\n", value); | ||
| 66 | } | ||
| 67 | DEVICE_ATTR_RO(deferred_probe); | ||
| 68 | |||
| 69 | /* | 56 | /* |
| 70 | * In some cases, like suspend to RAM or hibernation, It might be reasonable | 57 | * In some cases, like suspend to RAM or hibernation, It might be reasonable |
| 71 | * to prohibit probing of devices as it could be unsafe. | 58 | * to prohibit probing of devices as it could be unsafe. |
