提交 1f5681aa 编写于 作者: S Stefan Richter 提交者: Greg Kroah-Hartman

driver core: properly get driver in device_release_driver

Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f8916c11
...@@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev) ...@@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev)
{ {
struct device_driver * drv; struct device_driver * drv;
drv = dev->driver; drv = get_driver(dev->driver);
if (drv) { if (drv) {
get_driver(drv);
driver_sysfs_remove(dev); driver_sysfs_remove(dev);
sysfs_remove_link(&dev->kobj, "driver"); sysfs_remove_link(&dev->kobj, "driver");
klist_remove(&dev->knode_driver); klist_remove(&dev->knode_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册