提交 a0daeec9 编写于 作者: Y Yang Yingliang 提交者: Xie XiuQi

Revert "device: add device_shutdown_by_driver() helper"

This reverts commit 3cbd5bf6892f0c8c6a12d5848af1e1b46ec50eef.
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4a34ed5c
......@@ -2929,36 +2929,6 @@ void device_shutdown(void)
spin_unlock(&devices_kset->list_lock);
}
void device_shutdown_by_driver(char *drv_name)
{
struct device *dev, *parent, *next;
int len = 0;
if (!drv_name)
return;
len = strlen(drv_name);
if (!len)
return;
wait_for_device_probe();
device_block_probing();
spin_lock(&devices_kset->list_lock);
list_for_each_entry_safe(dev, next, &devices_kset->list, kobj.entry) {
if (dev->driver && len == strlen(dev->driver->name) &&
!strncmp(dev->driver->name, drv_name, len)) {
parent = get_device(dev->parent);
get_device(dev);
list_del(&dev->kobj.entry);
spin_unlock(&devices_kset->list_lock);
device_shutdown_one(dev, parent);
spin_lock(&devices_kset->list_lock);
}
}
spin_unlock(&devices_kset->list_lock);
}
/*
* Device logging functions
*/
......
......@@ -1321,7 +1321,6 @@ static inline int devtmpfs_mount(const char *mountpoint) { return 0; }
/* drivers/base/power/shutdown.c */
extern void device_shutdown(void);
extern void device_shutdown_by_driver(char *drv_name);
/* debugging and troubleshooting/diagnostic helpers. */
extern const char *dev_driver_string(const struct device *dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册