]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Convert touchscreen to input_allocate_device() to remove:
authorDirk Behme <dirk.behme@de.bosch.com>
Sat, 14 Jan 2006 00:17:12 +0000 (16:17 -0800)
committerTony Lindgren <tony@atomide.com>
Sat, 14 Jan 2006 00:17:12 +0000 (16:17 -0800)
input: device omap_ts is statically allocated, will not register
Please convert to input_allocate_device() or contact dtor_core@ameritech.net

Signed-off-by: Dirk Behme <dirk.behme_at_de.bosch.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/input/touchscreen/omap/omap_ts.c
drivers/input/touchscreen/omap/omap_ts.h

index 3b13c0d272f3b4889b9457de59ed582275ee2cc0..5916245d11d96a00d0a29c66b61769696b11f44e 100644 (file)
@@ -65,10 +65,10 @@ static int omap_ts_read(void)
 
        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]);
@@ -85,7 +85,7 @@ static void omap_ts_timer(unsigned long data)
        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();
@@ -95,12 +95,12 @@ static void omap_ts_timer(unsigned long data)
                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;
@@ -167,14 +167,14 @@ static int __init omap_ts_probe(struct platform_device *pdev)
                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();
 
@@ -186,7 +186,7 @@ static int __init omap_ts_probe(struct platform_device *pdev)
 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);
 
index 718b0c7eedea605b3eb9ad03c3c8b88267a993f1..fade7bde04b8b6990063367d700a4172d8c3c66c 100644 (file)
@@ -42,7 +42,7 @@ struct ts_device {
 };
 
 struct omap_ts_t{
-       struct input_dev inputdevice;
+       struct input_dev inputdevice;
        struct timer_list ts_timer;      // Timer for triggering acquisitions
        int touched;
        int irq;