ts_omap.dev->read(data);
- input_report_abs(&(ts_omap.inputdevice), ABS_X, data[0]);
- input_report_abs(&(ts_omap.inputdevice), ABS_Y, data[1]);
- input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE, data[2]);
- input_sync(&(ts_omap.inputdevice));
+ input_report_abs(ts_omap.inputdevice, ABS_X, data[0]);
+ input_report_abs(ts_omap.inputdevice, ABS_Y, data[1]);
+ input_report_abs(ts_omap.inputdevice, ABS_PRESSURE, data[2]);
+ input_sync(ts_omap.inputdevice);
DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1],
data[2]);
if (!ts_omap.dev->penup()) {
if (!ts_omap.touched) {
DEBUG_TS("omap_ts_timer: pen down\n");
- input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 1);
+ input_report_key(ts_omap.inputdevice, BTN_TOUCH, 1);
}
ts_omap.touched = 1;
omap_ts_read();
if (ts_omap.touched) {
DEBUG_TS("omap_ts_timer: pen up\n");
ts_omap.touched = 0;
- input_report_abs(&(ts_omap.inputdevice), ABS_X, 0);
- input_report_abs(&(ts_omap.inputdevice), ABS_Y, 0);
- input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE,
+ input_report_abs(ts_omap.inputdevice, ABS_X, 0);
+ input_report_abs(ts_omap.inputdevice, ABS_Y, 0);
+ input_report_abs(ts_omap.inputdevice, ABS_PRESSURE,
0);
- input_sync(&(ts_omap.inputdevice));
- input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 0);
+ input_sync(ts_omap.inputdevice);
+ input_report_key(ts_omap.inputdevice, BTN_TOUCH, 0);
}
if (!ts_omap.irq_enabled) {
ts_omap.irq_enabled = 1;
return -EINVAL;
}
- init_input_dev(&(ts_omap.inputdevice));
- ts_omap.inputdevice.name = OMAP_TS_NAME;
- ts_omap.inputdevice.dev = &pdev->dev;
- ts_omap.inputdevice.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
- ts_omap.inputdevice.keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
- ts_omap.inputdevice.absbit[0] =
+ ts_omap.inputdevice = input_allocate_device();
+ ts_omap.inputdevice->name = OMAP_TS_NAME;
+ ts_omap.inputdevice->dev = &pdev->dev;
+ ts_omap.inputdevice->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
+ ts_omap.inputdevice->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
+ ts_omap.inputdevice->absbit[0] =
BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
- input_register_device(&(ts_omap.inputdevice));
+ input_register_device(ts_omap.inputdevice);
ts_omap.dev->enable();
static int omap_ts_remove(struct platform_device *pdev)
{
ts_omap.dev->disable();
- input_unregister_device(&ts_omap.inputdevice);
+ input_unregister_device(ts_omap.inputdevice);
if (ts_omap.irq != -1)
free_irq(ts_omap.irq, &ts_omap);