/**
* Device_create-creates a device and registers it with sysfs
* @ Class: pointer to the struct class that this device shoshould be registered
* @ Parent: pointer to the parent struct device of this new device, if any
* @ Devt: The dev_t for the char device to be added
* @ Drvdata: The data to be added to the device for callbacks
* @ FMT: string for the device's name
*
* This function can be used by char device classes. A struct Device
* Will be created in sysfs, registered to the specified class.
*
* A "Dev" file will be created, showing the dev_t for the device, if
* The dev_t is not 0, 0.
* If a pointer to a parent struct device is passed in, the newly created
* Struct device will be a child of that device in sysfs.
* The pointer to the struct device will be returned from the call.
* Any further sysfs files that might be required can be created using this
* Pointer.
*
* Returns & struct device pointer on success, or err_ptr () on error.
*
* Note: The struct class passed to this function must have previusly
* Been created with a call to class_create ().
*/
Struct device * device_create (struct class * class, struct device * parent,
Dev_t devt, void * drvdata, const char * FMT ,...)
{
Va_list vargs;
Struct device * dev;
Va_start (vargs, FMT );
Dev = device_create_vargs (class, parent, devt, drvdata, FMT, vargs );
Va_end (vargs );
Return dev;
}
Export_symbol_gpl (device_create );