---
name: "devm_input_allocate_polled_device"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/devm_input_allocate_polled_device"
---

# devm\_input\_allocate\_polled\_device(9)

allocate managed polled device

## NAME

devm\_input\_allocate\_polled\_device - allocate managed polled device

## SYNOPSIS

**struct input\_polled\_dev \* devm\_input\_allocate\_polled\_device(struct device \*** *dev***);**

## ARGUMENTS

*dev*

device owning the polled device being created

## DESCRIPTION

Returns prepared struct input\_polled\_dev or **NULL**.

Managed polled 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 such managed polled device is allocated, it is ready to be set up and registered in the same fashion as regular polled input devices (using **input\_register\_polled\_device** function).

If you want to manually unregister and free such managed polled devices, it can be still done by calling **input\_unregister\_polled\_device** and **input\_free\_polled\_device**, although it is rarely needed.

## NOTE

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

## COPYRIGHT
