aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-09-23 16:01:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-16 12:24:51 -0400
commit3ce24d8d93f8f9617841d0c8416174da7ee1b042 (patch)
tree3658cd5d9131572b7822cc32bd07a672bdfdb243 /drivers/base
parent5172046d960b27f7c22bed8038d696e7004cb112 (diff)
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ef522ae55480..39b9b58c6974 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -333,9 +333,7 @@ static int match_name(struct device *dev, void *data)
333{ 333{
334 const char *name = data; 334 const char *name = data;
335 335
336 if (strcmp(name, dev->bus_id) == 0) 336 return sysfs_streq(name, dev->bus_id);
337 return 1;
338 return 0;
339} 337}
340 338
341/** 339/**