FreeBSD/sys/compat/linuxkpi/common/include/linux/device.h
/*
 * Devices are registered and created for exporting to sysfs. Create
 * implies register and register assumes the device fields have been
 * setup appropriately before being called.
 */
Devices are registered and created for exporting to sysfs. Create
implies register and register assumes the device fields have been
setup appropriately before being called.
Devices are registered and created for exporting to sysfs . Create implies register and register assumes the device fields have been setup appropriately before being called .
static inline void
device_initialize(struct device *dev)
{
	device_t bsddev;
	bsddev = NULL;
	if (dev->devt) {
		int unit = MINOR(dev->devt);
		bsddev = devclass_get_device(dev->class->bsdclass, unit);
	}
	if (bsddev != NULL)
		device_set_softc(bsddev, dev);
	dev->bsddev = bsddev;
	kobject_init(&dev->kobj, &linux_dev_ktype);
}
static inline void device_initialize ( struct device * dev ) { device_t bsddev ; bsddev = NULL ; if ( dev -> devt ) { int unit = MINOR ( dev -> devt ) ; bsddev = devclass_get_device ( dev -> class -> bsdclass , unit ) ; } if ( bsddev != NULL ) device_set_softc ( bsddev , dev ) ; dev -> bsddev = bsddev ; kobject_init ( & dev -> kobj , & linux_dev_ktype ) ; }
Devices are registered and created for exporting to sysfs.
Devices are registered and created for exporting to sysfs .