[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1224177047-11859-34-git-send-email-gregkh@suse.de>
Date: Thu, 16 Oct 2008 10:10:35 -0700
From: Greg Kroah-Hartman <gregkh@...e.de>
To: linux-kernel@...r.kernel.org
Cc: Peter Korsgaard <jacmet@...site.dk>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH 34/46] Driver core: make bus_find_device_by_name() more robust
From: Peter Korsgaard <jacmet@...site.dk>
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@...site.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/base/bus.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ef522ae..39b9b58 100644
--- 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);
}
/**
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists