---
name: "input_mt_assign_slots"
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/input_mt_assign_slots"
---

# input\_mt\_assign\_slots(9)

perform a best-match assignment

## NAME

input\_mt\_assign\_slots - perform a best-match assignment

## SYNOPSIS

**int input\_mt\_assign\_slots(struct input\_dev \*** *dev***, int \*** *slots***, const struct input\_mt\_pos \*** *pos***, int** *num\_pos***);**

## ARGUMENTS

*dev*

input device with allocated MT slots

*slots*

the slot assignment to be filled

*pos*

the position array to match

*num\_pos*

number of positions

## DESCRIPTION

Performs a best match against the current contacts and returns the slot assignment list. New contacts are assigned to unused slots.

Returns zero on success, or negative error in case of failure.

## COPYRIGHT
