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: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
5172046d96
commit
3ce24d8d93
1 changed files with 1 additions and 3 deletions
|
@ -333,9 +333,7 @@ static int match_name(struct device *dev, void *data)
|
||||||
{
|
{
|
||||||
const char *name = data;
|
const char *name = data;
|
||||||
|
|
||||||
if (strcmp(name, dev->bus_id) == 0)
|
return sysfs_streq(name, dev->bus_id);
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue