summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 11:16:46 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-16 11:16:46 +0200
commitcb9aa97c21c59ad01c9514d7faf45dc166fba226 (patch)
tree66a530f154db78b85f5b1406ebc51401df8d3913 /drivers/base/core.c
parent668a6c3654560aef8741642478973e205a4f02bf (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into tracing/mmiotrace-mergefixupstip-tracing-mmiotrace-mergefixups-2008-06-16_09.16_Mon
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 72eccae4904b..ee0a51a3a41d 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -760,6 +760,22 @@ static void device_remove_class_symlinks(struct device *dev)
}
/**
+ * dev_set_name - set a device name
+ * @dev: device
+ * @fmt: format string for the device's name
+ */
+int dev_set_name(struct device *dev, const char *fmt, ...)
+{
+ va_list vargs;
+
+ va_start(vargs, fmt);
+ vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs);
+ va_end(vargs);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(dev_set_name);
+
+/**
* device_add - add device to device hierarchy.
* @dev: device.
*