Skip to content

Commit

Permalink
Revert "driver core: Add deferred_probe attribute to devices in sysfs"
Browse files Browse the repository at this point in the history
This reverts commit 6751667.

Rob Herring objected to it, and a replacement for it will be added using
debugfs in the future.

Cc: Ben Hutchings <[email protected]>
Reported-by: Rob Herring <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jan 14, 2017
1 parent a121103 commit c7334ce
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
12 changes: 0 additions & 12 deletions Documentation/ABI/testing/sysfs-devices-deferred_probe

This file was deleted.

2 changes: 0 additions & 2 deletions drivers/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ extern void device_unblock_probing(void);
extern struct kset *devices_kset;
extern void devices_kset_move_last(struct device *dev);

extern struct device_attribute dev_attr_deferred_probe;

#if defined(CONFIG_MODULES) && defined(CONFIG_SYSFS)
extern void module_add_driver(struct module *mod, struct device_driver *drv);
extern void module_remove_driver(struct device_driver *drv);
Expand Down
7 changes: 0 additions & 7 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,14 +1060,8 @@ static int device_add_attrs(struct device *dev)
goto err_remove_dev_groups;
}

error = device_create_file(dev, &dev_attr_deferred_probe);
if (error)
goto err_remove_online;

return 0;

err_remove_online:
device_remove_file(dev, &dev_attr_online);
err_remove_dev_groups:
device_remove_groups(dev, dev->groups);
err_remove_type_groups:
Expand All @@ -1085,7 +1079,6 @@ static void device_remove_attrs(struct device *dev)
struct class *class = dev->class;
const struct device_type *type = dev->type;

device_remove_file(dev, &dev_attr_deferred_probe);
device_remove_file(dev, &dev_attr_online);
device_remove_groups(dev, dev->groups);

Expand Down
13 changes: 0 additions & 13 deletions drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,6 @@ static LIST_HEAD(deferred_probe_pending_list);
static LIST_HEAD(deferred_probe_active_list);
static atomic_t deferred_trigger_count = ATOMIC_INIT(0);

static ssize_t deferred_probe_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
bool value;

mutex_lock(&deferred_probe_mutex);
value = !list_empty(&dev->p->deferred_probe);
mutex_unlock(&deferred_probe_mutex);

return sprintf(buf, "%d\n", value);
}
DEVICE_ATTR_RO(deferred_probe);

/*
* In some cases, like suspend to RAM or hibernation, It might be reasonable
* to prohibit probing of devices as it could be unsafe.
Expand Down

0 comments on commit c7334ce

Please sign in to comment.