input: mt: Collect slots initialization code

The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
This commit is contained in:
Henrik Rydberg
2010-11-27 10:50:54 +01:00
parent 47c78e8913
commit 8cde810016
6 changed files with 18 additions and 15 deletions

View File

@ -33,7 +33,7 @@ static inline int input_mt_get_value(const struct input_mt_slot *slot,
return slot->abs[code - ABS_MT_FIRST];
}
int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots);
int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots);
void input_mt_destroy_slots(struct input_dev *dev);
static inline void input_mt_slot(struct input_dev *dev, int slot)