devm_input_allocate_device()¶
Purpose¶
Allocates an input device with device-managed lifetime.
Header¶
Prototype¶
Parameters¶
dev: parent device used for managed cleanup.
Return Value¶
- Success: pointer to
struct input_dev. - Failure:
NULL.
Minimal Example¶
Common Pitfalls¶
- Configure supported event types and codes before registration.
- Do not manually free the device when using the
devm_variant.