提交 3ce24d8d 编写于 作者: P Peter Korsgaard 提交者: Greg Kroah-Hartman

Driver core: make bus_find_device_by_name() more robust

Use sysfs_streq() in bus_find_device_by_name() so trailing newlines
are ignored (E.G. in bind/unbind).
Signed-off-by: NPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5172046d
......@@ -333,9 +333,7 @@ static int match_name(struct device *dev, void *data)
{
const char *name = data;
if (strcmp(name, dev->bus_id) == 0)
return 1;
return 0;
return sysfs_streq(name, dev->bus_id);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册