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:
@@ -24,6 +24,12 @@ struct input_device *input_device_create(void)
|
||||
return INPUT_DEVICE(dev);
|
||||
}
|
||||
|
||||
struct input_device *input_device_from_generic(struct device *dev)
|
||||
{
|
||||
dev->dev_type = DEV_TYPE_INPUT;
|
||||
return INPUT_DEVICE(dev);
|
||||
}
|
||||
|
||||
kern_status_t input_device_report_event(struct input_device *dev, const struct input_event *ev, bool noblock)
|
||||
{
|
||||
struct ringbuffer *event_queue = &dev->i_events;
|
||||
|
||||
Reference in New Issue
Block a user