aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-26 10:40:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-26 10:40:28 -0800
commited803862954528e6fcf7bd0f2b2e5a772a7c3281 (patch)
treefce02fe5ebc10a5a8da5e034e2bb25d79d07a808 /drivers
parent6aeea60aee945449c93d9aa70638deeb5c4c5439 (diff)
parentc0e69a5bbc6fc74184aa043aadb9a53bc58f953b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: klist.c: bit 0 in pointer can't be used as flag debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n sysfs: fix problems with binary files PNP: fix broken pnp lowercasing for acpi module aliases driver core: Convert '/' to '!' in dev_set_name()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 8079afca497..55e530942ab 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -777,10 +777,16 @@ static void device_remove_class_symlinks(struct device *dev)
int dev_set_name(struct device *dev, const char *fmt, ...)
{
va_list vargs;
+ char *s;
va_start(vargs, fmt);
vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs);
va_end(vargs);
+
+ /* ewww... some of these buggers have / in the name... */
+ while ((s = strchr(dev->bus_id, '/')))
+ *s = '!';
+
return 0;
}
EXPORT_SYMBOL_GPL(dev_set_name);