FwupdPlugin.Device.poll_locker_new

### Method

# FwupdPlugin Devicepoll_locker_new

since: 1.8.1

#### Declaration [src]

    FuDeviceLocker*
    fu_device_poll_locker_new (
      FuDevice* self
      GError** error
    )

#### Description [src]

Returns a device locker that prevents polling on the device. If there are no open poll lockers then the poll callback will be called.

Use `FU_DEVICE_PRIVATE_FLAG_AUTO_PAUSE_POLLING` to opt into this functionality.

Available since: 1.8.1

#### Return value

Type: `FuDeviceLocker`

A `FuDeviceLocker`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.