diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:20:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:20:37 -0400 |
commit | 3557b18fcbe0e29706214f3c7cc680a7823605eb (patch) | |
tree | 2a70696b78a9e8b5ba38090901301931d395ecfb /drivers/base | |
parent | 4226ab93d8ae3fd895abe45879fe34d489a98718 (diff) | |
parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) |
Merge branch 'linus' into x86/ptemask
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 16 |
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) | |||
760 | } | 760 | } |
761 | 761 | ||
762 | /** | 762 | /** |
763 | * dev_set_name - set a device name | ||
764 | * @dev: device | ||
765 | * @fmt: format string for the device's name | ||
766 | */ | ||
767 | int dev_set_name(struct device *dev, const char *fmt, ...) | ||
768 | { | ||
769 | va_list vargs; | ||
770 | |||
771 | va_start(vargs, fmt); | ||
772 | vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs); | ||
773 | va_end(vargs); | ||
774 | return 0; | ||
775 | } | ||
776 | EXPORT_SYMBOL_GPL(dev_set_name); | ||
777 | |||
778 | /** | ||
763 | * device_add - add device to device hierarchy. | 779 | * device_add - add device to device hierarchy. |
764 | * @dev: device. | 780 | * @dev: device. |
765 | * | 781 | * |