diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index be9aba4dc2fb..4dc0d272f6d9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -1273,40 +1273,6 @@ struct device *device_create_drvdata(struct class *class, | |||
1273 | } | 1273 | } |
1274 | EXPORT_SYMBOL_GPL(device_create_drvdata); | 1274 | EXPORT_SYMBOL_GPL(device_create_drvdata); |
1275 | 1275 | ||
1276 | /** | ||
1277 | * device_create - creates a device and registers it with sysfs | ||
1278 | * @class: pointer to the struct class that this device should be registered to | ||
1279 | * @parent: pointer to the parent struct device of this new device, if any | ||
1280 | * @devt: the dev_t for the char device to be added | ||
1281 | * @fmt: string for the device's name | ||
1282 | * | ||
1283 | * This function can be used by char device classes. A struct device | ||
1284 | * will be created in sysfs, registered to the specified class. | ||
1285 | * | ||
1286 | * A "dev" file will be created, showing the dev_t for the device, if | ||
1287 | * the dev_t is not 0,0. | ||
1288 | * If a pointer to a parent struct device is passed in, the newly created | ||
1289 | * struct device will be a child of that device in sysfs. | ||
1290 | * The pointer to the struct device will be returned from the call. | ||
1291 | * Any further sysfs files that might be required can be created using this | ||
1292 | * pointer. | ||
1293 | * | ||
1294 | * Note: the struct class passed to this function must have previously | ||
1295 | * been created with a call to class_create(). | ||
1296 | */ | ||
1297 | struct device *device_create(struct class *class, struct device *parent, | ||
1298 | dev_t devt, const char *fmt, ...) | ||
1299 | { | ||
1300 | va_list vargs; | ||
1301 | struct device *dev; | ||
1302 | |||
1303 | va_start(vargs, fmt); | ||
1304 | dev = device_create_vargs(class, parent, devt, NULL, fmt, vargs); | ||
1305 | va_end(vargs); | ||
1306 | return dev; | ||
1307 | } | ||
1308 | EXPORT_SYMBOL_GPL(device_create); | ||
1309 | |||
1310 | static int __match_devt(struct device *dev, void *data) | 1276 | static int __match_devt(struct device *dev, void *data) |
1311 | { | 1277 | { |
1312 | dev_t *devt = data; | 1278 | dev_t *devt = data; |