aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:08 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:08 -0400
commit40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (patch)
tree703746fcfdd42e63110672d5da6014e2d6120ef7 /drivers
parent0ca1804f2e4d78e6a037da23f96aa56f762e78fb (diff)
Input: drivers/input/touchscreen - don't access dev->private directly
Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/corgi_ts.c1
-rw-r--r--drivers/input/touchscreen/elo.c1
-rw-r--r--drivers/input/touchscreen/gunze.c1
-rw-r--r--drivers/input/touchscreen/h3600_ts_input.c7
-rw-r--r--drivers/input/touchscreen/mtouch.c1
-rw-r--r--drivers/input/touchscreen/penmount.c1
-rw-r--r--drivers/input/touchscreen/touchright.c1
-rw-r--r--drivers/input/touchscreen/touchwin.c1
-rw-r--r--drivers/input/touchscreen/ucb1400_ts.c7
9 files changed, 8 insertions, 13 deletions
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c
index e2945582828e..4965c0519470 100644
--- a/drivers/input/touchscreen/corgi_ts.c
+++ b/drivers/input/touchscreen/corgi_ts.c
@@ -301,7 +301,6 @@ static int __init corgits_probe(struct platform_device *pdev)
301 input_dev->id.product = 0x0002; 301 input_dev->id.product = 0x0002;
302 input_dev->id.version = 0x0100; 302 input_dev->id.version = 0x0100;
303 input_dev->cdev.dev = &pdev->dev; 303 input_dev->cdev.dev = &pdev->dev;
304 input_dev->private = corgi_ts;
305 304
306 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 305 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
307 input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); 306 input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c
index 9d61cd133d01..7e2f326fb008 100644
--- a/drivers/input/touchscreen/elo.c
+++ b/drivers/input/touchscreen/elo.c
@@ -312,7 +312,6 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
312 init_completion(&elo->cmd_done); 312 init_completion(&elo->cmd_done);
313 snprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys); 313 snprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys);
314 314
315 input_dev->private = elo;
316 input_dev->name = "Elo Serial TouchScreen"; 315 input_dev->name = "Elo Serial TouchScreen";
317 input_dev->phys = elo->phys; 316 input_dev->phys = elo->phys;
318 input_dev->id.bustype = BUS_RS232; 317 input_dev->id.bustype = BUS_RS232;
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c
index 9157eb148e84..399eb4a834a4 100644
--- a/drivers/input/touchscreen/gunze.c
+++ b/drivers/input/touchscreen/gunze.c
@@ -130,7 +130,6 @@ static int gunze_connect(struct serio *serio, struct serio_driver *drv)
130 gunze->dev = input_dev; 130 gunze->dev = input_dev;
131 snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys); 131 snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys);
132 132
133 input_dev->private = gunze;
134 input_dev->name = "Gunze AHL-51S TouchScreen"; 133 input_dev->name = "Gunze AHL-51S TouchScreen";
135 input_dev->phys = gunze->phys; 134 input_dev->phys = gunze->phys;
136 input_dev->id.bustype = BUS_RS232; 135 input_dev->id.bustype = BUS_RS232;
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
index c4116d4f64e7..2b01acec326c 100644
--- a/drivers/input/touchscreen/h3600_ts_input.c
+++ b/drivers/input/touchscreen/h3600_ts_input.c
@@ -147,7 +147,7 @@ enum flite_pwr {
147unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr) 147unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr)
148{ 148{
149 unsigned char brightness = (pwr == FLITE_PWR_OFF) ? 0 : flite_brightness; 149 unsigned char brightness = (pwr == FLITE_PWR_OFF) ? 0 : flite_brightness;
150 struct h3600_dev *ts = dev->private; 150 struct h3600_dev *ts = input_get_drvdata(dev);
151 151
152 /* Must be in this order */ 152 /* Must be in this order */
153 ts->serio->write(ts->serio, 1); 153 ts->serio->write(ts->serio, 1);
@@ -260,7 +260,7 @@ static int h3600ts_event(struct input_dev *dev, unsigned int type,
260 unsigned int code, int value) 260 unsigned int code, int value)
261{ 261{
262#if 0 262#if 0
263 struct h3600_dev *ts = dev->private; 263 struct h3600_dev *ts = input_get_drvdata(dev);
264 264
265 switch (type) { 265 switch (type) {
266 case EV_LED: { 266 case EV_LED: {
@@ -368,7 +368,8 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv)
368 input_dev->id.product = 0x0666; /* FIXME !!! We can ask the hardware */ 368 input_dev->id.product = 0x0666; /* FIXME !!! We can ask the hardware */
369 input_dev->id.version = 0x0100; 369 input_dev->id.version = 0x0100;
370 input_dev->cdev.dev = &serio->dev; 370 input_dev->cdev.dev = &serio->dev;
371 input_dev->private = ts; 371
372 input_set_drvdata(input_dev, ts);
372 373
373 input_dev->event = h3600ts_event; 374 input_dev->event = h3600ts_event;
374 375
diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c
index c3c2d735d0ec..53b0683556be 100644
--- a/drivers/input/touchscreen/mtouch.c
+++ b/drivers/input/touchscreen/mtouch.c
@@ -144,7 +144,6 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv)
144 mtouch->dev = input_dev; 144 mtouch->dev = input_dev;
145 snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys); 145 snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys);
146 146
147 input_dev->private = mtouch;
148 input_dev->name = "MicroTouch Serial TouchScreen"; 147 input_dev->name = "MicroTouch Serial TouchScreen";
149 input_dev->phys = mtouch->phys; 148 input_dev->phys = mtouch->phys;
150 input_dev->id.bustype = BUS_RS232; 149 input_dev->id.bustype = BUS_RS232;
diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c
index bd2767991ae9..65a4e0ac69a8 100644
--- a/drivers/input/touchscreen/penmount.c
+++ b/drivers/input/touchscreen/penmount.c
@@ -105,7 +105,6 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv)
105 pm->dev = input_dev; 105 pm->dev = input_dev;
106 snprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys); 106 snprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys);
107 107
108 input_dev->private = pm;
109 input_dev->name = "Penmount Serial TouchScreen"; 108 input_dev->name = "Penmount Serial TouchScreen";
110 input_dev->phys = pm->phys; 109 input_dev->phys = pm->phys;
111 input_dev->id.bustype = BUS_RS232; 110 input_dev->id.bustype = BUS_RS232;
diff --git a/drivers/input/touchscreen/touchright.c b/drivers/input/touchscreen/touchright.c
index 35ba46c6ad2d..63d2d4491001 100644
--- a/drivers/input/touchscreen/touchright.c
+++ b/drivers/input/touchscreen/touchright.c
@@ -118,7 +118,6 @@ static int tr_connect(struct serio *serio, struct serio_driver *drv)
118 tr->dev = input_dev; 118 tr->dev = input_dev;
119 snprintf(tr->phys, sizeof(tr->phys), "%s/input0", serio->phys); 119 snprintf(tr->phys, sizeof(tr->phys), "%s/input0", serio->phys);
120 120
121 input_dev->private = tr;
122 input_dev->name = "Touchright Serial TouchScreen"; 121 input_dev->name = "Touchright Serial TouchScreen";
123 input_dev->phys = tr->phys; 122 input_dev->phys = tr->phys;
124 input_dev->id.bustype = BUS_RS232; 123 input_dev->id.bustype = BUS_RS232;
diff --git a/drivers/input/touchscreen/touchwin.c b/drivers/input/touchscreen/touchwin.c
index 4dc073dacabb..3da9c8c3f156 100644
--- a/drivers/input/touchscreen/touchwin.c
+++ b/drivers/input/touchscreen/touchwin.c
@@ -125,7 +125,6 @@ static int tw_connect(struct serio *serio, struct serio_driver *drv)
125 tw->dev = input_dev; 125 tw->dev = input_dev;
126 snprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys); 126 snprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys);
127 127
128 input_dev->private = tw;
129 input_dev->name = "Touchwindow Serial TouchScreen"; 128 input_dev->name = "Touchwindow Serial TouchScreen";
130 input_dev->phys = tw->phys; 129 input_dev->phys = tw->phys;
131 input_dev->id.bustype = BUS_RS232; 130 input_dev->id.bustype = BUS_RS232;
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index c7db4032ef02..fe4bdf683d1d 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -369,7 +369,7 @@ static irqreturn_t ucb1400_hard_irq(int irqnr, void *devid)
369 369
370static int ucb1400_ts_open(struct input_dev *idev) 370static int ucb1400_ts_open(struct input_dev *idev)
371{ 371{
372 struct ucb1400 *ucb = idev->private; 372 struct ucb1400 *ucb = input_get_drvdata(idev);
373 int ret = 0; 373 int ret = 0;
374 374
375 BUG_ON(ucb->ts_task); 375 BUG_ON(ucb->ts_task);
@@ -385,7 +385,7 @@ static int ucb1400_ts_open(struct input_dev *idev)
385 385
386static void ucb1400_ts_close(struct input_dev *idev) 386static void ucb1400_ts_close(struct input_dev *idev)
387{ 387{
388 struct ucb1400 *ucb = idev->private; 388 struct ucb1400 *ucb = input_get_drvdata(idev);
389 389
390 if (ucb->ts_task) 390 if (ucb->ts_task)
391 kthread_stop(ucb->ts_task); 391 kthread_stop(ucb->ts_task);
@@ -507,7 +507,8 @@ static int ucb1400_ts_probe(struct device *dev)
507 } 507 }
508 printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq); 508 printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq);
509 509
510 idev->private = ucb; 510 input_set_drvdata(idev, ucb);
511
511 idev->cdev.dev = dev; 512 idev->cdev.dev = dev;
512 idev->name = "UCB1400 touchscreen interface"; 513 idev->name = "UCB1400 touchscreen interface";
513 idev->id.vendor = ucb1400_reg_read(ucb, AC97_VENDOR_ID1); 514 idev->id.vendor = ucb1400_reg_read(ucb, AC97_VENDOR_ID1);