projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5172046
)
Driver core: make bus_find_device_by_name() more robust
author
Peter Korsgaard
<jacmet@sunsite.dk>
Tue, 23 Sep 2008 20:01:27 +0000
(22:01 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 16 Oct 2008 16:24:51 +0000
(09:24 -0700)
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>
drivers/base/bus.c
patch
|
blob
|
history
diff --git
a/drivers/base/bus.c
b/drivers/base/bus.c
index ef522ae5548092f83ddabcbf36d7a54ad56f7282..39b9b58c6974c72c75e8d2a5293a4ab3adc13819 100644
(file)
--- a/
drivers/base/bus.c
+++ b/
drivers/base/bus.c
@@
-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);
}
/**