aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/core.c34
-rw-r--r--include/linux/device.h3
2 files changed, 0 insertions, 37 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}
1274EXPORT_SYMBOL_GPL(device_create_drvdata); 1274EXPORT_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 */
1297struct 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}
1308EXPORT_SYMBOL_GPL(device_create);
1309
1310static int __match_devt(struct device *dev, void *data) 1276static int __match_devt(struct device *dev, void *data)
1311{ 1277{
1312 dev_t *devt = data; 1278 dev_t *devt = data;
diff --git a/include/linux/device.h b/include/linux/device.h
index e49aa74f248c..a3ef5a2d4fbb 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -470,9 +470,6 @@ 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);
473extern struct device *device_create(struct class *cls, struct device *parent,
474 dev_t devt, const char *fmt, ...)
475 __attribute__((format(printf, 4, 5)));
476extern struct device *device_create_drvdata(struct class *cls, 473extern struct device *device_create_drvdata(struct class *cls,
477 struct device *parent, 474 struct device *parent,
478 dev_t devt, 475 dev_t devt,