evdev_device_get_touch_count(struct evdev_device *device)
{
	int ntouches;

	if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
		return -1;

	ntouches = libevdev_get_num_slots(device->evdev);
	if (ntouches == -1) {
		/* mtdev devices have multitouch but we don't know
		 * how many. Otherwise, any touch device with num_slots of
		 * -1 is a single-touch device */
		if (device->mtdev)
			ntouches = 0;
		else
			ntouches = 1;
	}

	return ntouches;
}
evdev_device_get_touch_count(struct evdev_device *device)
{
	int ntouches;

	if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
		return -1;

	ntouches = libevdev_get_num_slots(device->evdev);
	if (ntouches == -1) {
		 
		if (device->mtdev)
			ntouches = 0;
		else
			ntouches = 1;
	}

	return ntouches;
}