diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-29 21:29:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-29 21:29:39 -0700 |
commit | 916941b2bfd9c4a8b66855f198ae16c3f51ef570 (patch) | |
tree | 471867d3d460f10d1620efe3c85763c4d95fa14d /drivers | |
parent | fbf4d7ffda0398e8b20aa8b34ca751bf946699ef (diff) | |
parent | 413c239fad68258157f903b3ffd9bfcc53f5e34b (diff) | |
download | talos-obmc-linux-916941b2bfd9c4a8b66855f198ae16c3f51ef570.tar.gz talos-obmc-linux-916941b2bfd9c4a8b66855f198ae16c3f51ef570.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
driver-core: prepare for 2.6.27 api change by adding dev_set_name
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 72eccae4904b..422cfcad486d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -760,6 +760,21 @@ static void device_remove_class_symlinks(struct device *dev) } /** + * dev_set_name - set a device name + * @dev: device + */ +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. * |