Input: drivers/input/touchscreen - don't access dev->private directly
authorDmitry Torokhov <dtor@insightbb.com>
Thu, 12 Apr 2007 05:34:08 +0000 (01:34 -0400)
committerDmitry Torokhov <dtor@insightbb.com>
Thu, 12 Apr 2007 05:34:08 +0000 (01:34 -0400)
Use input_get_drvdata() and input_set_drvdata() instead.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/corgi_ts.c
drivers/input/touchscreen/elo.c
drivers/input/touchscreen/gunze.c
drivers/input/touchscreen/h3600_ts_input.c
drivers/input/touchscreen/mtouch.c
drivers/input/touchscreen/penmount.c
drivers/input/touchscreen/touchright.c
drivers/input/touchscreen/touchwin.c
drivers/input/touchscreen/ucb1400_ts.c

index e2945582828e2436c0094e438828d58672523c4f..4965c051947042c50ca3afbc861b9e7d06048f1b 100644 (file)
@@ -301,7 +301,6 @@ static int __init corgits_probe(struct platform_device *pdev)
        input_dev->id.product = 0x0002;
        input_dev->id.version = 0x0100;
        input_dev->cdev.dev = &pdev->dev;
-       input_dev->private = corgi_ts;
 
        input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
        input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
index 9d61cd133d0179305f796a668768ce2ab37d3061..7e2f326fb0081141c53da7e39893b12b99a6a10d 100644 (file)
@@ -312,7 +312,6 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
        init_completion(&elo->cmd_done);
        snprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys);
 
-       input_dev->private = elo;
        input_dev->name = "Elo Serial TouchScreen";
        input_dev->phys = elo->phys;
        input_dev->id.bustype = BUS_RS232;
index 9157eb148e84cb784130652bb0c50a4a9649a6b3..399eb4a834a4cf19306fa19a5db9d4c497f60c36 100644 (file)
@@ -130,7 +130,6 @@ static int gunze_connect(struct serio *serio, struct serio_driver *drv)
        gunze->dev = input_dev;
        snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys);
 
-       input_dev->private = gunze;
        input_dev->name = "Gunze AHL-51S TouchScreen";
        input_dev->phys = gunze->phys;
        input_dev->id.bustype = BUS_RS232;
index c4116d4f64e7ae5d85424dfa0cb02c450b758b84..2b01acec326ce0caa67464df8305016a26bd073a 100644 (file)
@@ -147,7 +147,7 @@ enum flite_pwr {
 unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr)
 {
        unsigned char brightness = (pwr == FLITE_PWR_OFF) ? 0 : flite_brightness;
-       struct h3600_dev *ts = dev->private;
+       struct h3600_dev *ts = input_get_drvdata(dev);
 
        /* Must be in this order */
        ts->serio->write(ts->serio, 1);
@@ -260,7 +260,7 @@ static int h3600ts_event(struct input_dev *dev, unsigned int type,
                         unsigned int code, int value)
 {
 #if 0
-       struct h3600_dev *ts = dev->private;
+       struct h3600_dev *ts = input_get_drvdata(dev);
 
        switch (type) {
                case EV_LED: {
@@ -368,7 +368,8 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv)
        input_dev->id.product = 0x0666;  /* FIXME !!! We can ask the hardware */
        input_dev->id.version = 0x0100;
        input_dev->cdev.dev = &serio->dev;
-       input_dev->private = ts;
+
+       input_set_drvdata(input_dev, ts);
 
        input_dev->event = h3600ts_event;
 
index c3c2d735d0ec70c4f7a06d7e6bbe8db418767e0e..53b0683556beae2f91e060e46c904d32973b9595 100644 (file)
@@ -144,7 +144,6 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv)
        mtouch->dev = input_dev;
        snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys);
 
-       input_dev->private = mtouch;
        input_dev->name = "MicroTouch Serial TouchScreen";
        input_dev->phys = mtouch->phys;
        input_dev->id.bustype = BUS_RS232;
index bd2767991ae9b89cc1646d7061b5b3b0c207909a..65a4e0ac69a851ab15326cc70b66abc981464bf0 100644 (file)
@@ -105,7 +105,6 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv)
        pm->dev = input_dev;
        snprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys);
 
-       input_dev->private = pm;
        input_dev->name = "Penmount Serial TouchScreen";
        input_dev->phys = pm->phys;
        input_dev->id.bustype = BUS_RS232;
index 35ba46c6ad2d3f77530da62710d6ffacf72792aa..63d2d4491001309ae3709a3fa4ba9092d59acdab 100644 (file)
@@ -118,7 +118,6 @@ static int tr_connect(struct serio *serio, struct serio_driver *drv)
        tr->dev = input_dev;
        snprintf(tr->phys, sizeof(tr->phys), "%s/input0", serio->phys);
 
-       input_dev->private = tr;
        input_dev->name = "Touchright Serial TouchScreen";
        input_dev->phys = tr->phys;
        input_dev->id.bustype = BUS_RS232;
index 4dc073dacabbdbb2080d71fe15106422d5557342..3da9c8c3f1562e12f2a52e3fb60681deba3f376a 100644 (file)
@@ -125,7 +125,6 @@ static int tw_connect(struct serio *serio, struct serio_driver *drv)
        tw->dev = input_dev;
        snprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys);
 
-       input_dev->private = tw;
        input_dev->name = "Touchwindow Serial TouchScreen";
        input_dev->phys = tw->phys;
        input_dev->id.bustype = BUS_RS232;
index c7db4032ef02e5a09f4ddd98fd93d28753c96935..fe4bdf683d1dbc6a18f292cf4f17f58248996299 100644 (file)
@@ -369,7 +369,7 @@ static irqreturn_t ucb1400_hard_irq(int irqnr, void *devid)
 
 static int ucb1400_ts_open(struct input_dev *idev)
 {
-       struct ucb1400 *ucb = idev->private;
+       struct ucb1400 *ucb = input_get_drvdata(idev);
        int ret = 0;
 
        BUG_ON(ucb->ts_task);
@@ -385,7 +385,7 @@ static int ucb1400_ts_open(struct input_dev *idev)
 
 static void ucb1400_ts_close(struct input_dev *idev)
 {
-       struct ucb1400 *ucb = idev->private;
+       struct ucb1400 *ucb = input_get_drvdata(idev);
 
        if (ucb->ts_task)
                kthread_stop(ucb->ts_task);
@@ -507,7 +507,8 @@ static int ucb1400_ts_probe(struct device *dev)
        }
        printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq);
 
-       idev->private           = ucb;
+       input_set_drvdata(idev, ucb);
+
        idev->cdev.dev          = dev;
        idev->name              = "UCB1400 touchscreen interface";
        idev->id.vendor         = ucb1400_reg_read(ucb, AC97_VENDOR_ID1);