diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 23:03:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:47 -0400 |
commit | 4e10673944a5c386378ff9d692ae37e19993f9d5 (patch) | |
tree | 2b63ac2f30869d140d56279e55228c97fcf277c8 | |
parent | ccea44fadca396b0f89aed5bdeb60e4abb212566 (diff) |
device create: convert device_create_drvdata to device_create
Now that device_create() has been audited, rename things back to the
original call to be sane.
Keep the device_create_drvdata macro around to make merges easier.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/base/core.c | 11 | ||||
-rw-r--r-- | include/linux/device.h | 9 |
2 files changed, 8 insertions, 12 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 4dc0d272f6d9..9ae28aa709d5 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -1236,7 +1236,7 @@ error: | |||
1236 | EXPORT_SYMBOL_GPL(device_create_vargs); | 1236 | EXPORT_SYMBOL_GPL(device_create_vargs); |
1237 | 1237 | ||
1238 | /** | 1238 | /** |
1239 | * device_create_drvdata - creates a device and registers it with sysfs | 1239 | * device_create - creates a device and registers it with sysfs |
1240 | * @class: pointer to the struct class that this device should be registered to | 1240 | * @class: pointer to the struct class that this device should be registered to |
1241 | * @parent: pointer to the parent struct device of this new device, if any | 1241 | * @parent: pointer to the parent struct device of this new device, if any |
1242 | * @devt: the dev_t for the char device to be added | 1242 | * @devt: the dev_t for the char device to be added |
@@ -1257,11 +1257,8 @@ EXPORT_SYMBOL_GPL(device_create_vargs); | |||
1257 | * Note: the struct class passed to this function must have previously | 1257 | * Note: the struct class passed to this function must have previously |
1258 | * been created with a call to class_create(). | 1258 | * been created with a call to class_create(). |
1259 | */ | 1259 | */ |
1260 | struct device *device_create_drvdata(struct class *class, | 1260 | struct device *device_create(struct class *class, struct device *parent, |
1261 | struct device *parent, | 1261 | dev_t devt, void *drvdata, const char *fmt, ...) |
1262 | dev_t devt, | ||
1263 | void *drvdata, | ||
1264 | const char *fmt, ...) | ||
1265 | { | 1262 | { |
1266 | va_list vargs; | 1263 | va_list vargs; |
1267 | struct device *dev; | 1264 | struct device *dev; |
@@ -1271,7 +1268,7 @@ struct device *device_create_drvdata(struct class *class, | |||
1271 | va_end(vargs); | 1268 | va_end(vargs); |
1272 | return dev; | 1269 | return dev; |
1273 | } | 1270 | } |
1274 | EXPORT_SYMBOL_GPL(device_create_drvdata); | 1271 | EXPORT_SYMBOL_GPL(device_create); |
1275 | 1272 | ||
1276 | static int __match_devt(struct device *dev, void *data) | 1273 | static int __match_devt(struct device *dev, void *data) |
1277 | { | 1274 | { |
diff --git a/include/linux/device.h b/include/linux/device.h index a3ef5a2d4fbb..de178712e02c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -470,12 +470,11 @@ extern struct device *device_create_vargs(struct class *cls, | |||
470 | void *drvdata, | 470 | void *drvdata, |
471 | const char *fmt, | 471 | const char *fmt, |
472 | va_list vargs); | 472 | va_list vargs); |
473 | extern struct device *device_create_drvdata(struct class *cls, | 473 | extern struct device *device_create(struct class *cls, struct device *parent, |
474 | struct device *parent, | 474 | dev_t devt, void *drvdata, |
475 | dev_t devt, | 475 | const char *fmt, ...) |
476 | void *drvdata, | ||
477 | const char *fmt, ...) | ||
478 | __attribute__((format(printf, 5, 6))); | 476 | __attribute__((format(printf, 5, 6))); |
477 | #define device_create_drvdata device_create | ||
479 | extern void device_destroy(struct class *cls, dev_t devt); | 478 | extern void device_destroy(struct class *cls, dev_t devt); |
480 | 479 | ||
481 | /* | 480 | /* |