/* device_create_file - create sysfs attribute file for device. @dev: device. @attr: device attribute descriptor.  */
int device_create_file(struct device *dev, const struct device_attribute *attr)
/* device_create_file - create sysfs attribute file for device. @dev: device. @attr: device attribute descriptor.  */
int device_create_file(struct device *dev, const struct device_attribute *attr)
{
	int error = 0;
	if (dev)
		error = sysfs_create_file(&dev->kobj, &attr->attr);
	return error;
}