devm_input_allocate_device(9)

devm_input_allocate_device9

Allocate managed input device

Usage

struct input_dev * devm_input_allocate_device(struct device * dev);

Arguments

dev

device owning the input device being created

Overview

Returns prepared struct input_dev or NULL.

Managed input devices do not need to be explicitly unregistered or freed as it will be done automatically when owner device unbinds from its driver (or binding fails). Once managed input device is allocated, it is ready to be set up and registered in the same fashion as regular input device. There are no special devm_input_device_[un]register variants, regular ones work with both managed and unmanaged devices, should you need them. In most cases however, managed input device need not be explicitly unregistered or freed.

Note

the owner device is set up as parent of input device and users should not override it.

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.