dev: implement generic devices
generic devices don't have a type (char, block, etc) and are created by bus drivers to represent the device until a suitable driver is found. generic devices are registered by the bus driver. once a more suitable driver is found, that driver will re-register the device under itself.
This commit is contained in:
@@ -11,3 +11,9 @@ struct char_device *char_device_create(void)
|
||||
|
||||
return CHAR_DEVICE(dev);
|
||||
}
|
||||
|
||||
struct char_device *char_device_from_generic(struct device *dev)
|
||||
{
|
||||
dev->dev_type = DEV_TYPE_CHAR;
|
||||
return CHAR_DEVICE(dev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user