aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-08-05 03:30:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-08-05 03:43:43 -0400
commitdd0d5443da02b091636e967407805f0b7712fd44 (patch)
tree3b92ca97c4aee14d573bc091b3957e47d7a9105b /drivers
parentc46dd1eb9a4f1b8c1bb597a75199e3d34fb7b43b (diff)
Input: serio - don't use serio->write() directly
We have a nice wrapper for that. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/hil_kbd.c40
-rw-r--r--drivers/input/keyboard/lkkbd.c62
-rw-r--r--drivers/input/keyboard/sunkbd.c26
-rw-r--r--drivers/input/mouse/hil_ptr.c32
-rw-r--r--drivers/input/mouse/vsxxxaa.c8
-rw-r--r--drivers/input/touchscreen/h3600_ts_input.c9
6 files changed, 91 insertions, 86 deletions
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index 6f356705ee3b..f732893a960e 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -280,28 +280,28 @@ static int hil_kbd_connect(struct serio *serio, struct serio_driver *drv)
280 init_MUTEX_LOCKED(&kbd->sem); 280 init_MUTEX_LOCKED(&kbd->sem);
281 281
282 /* Get device info. MLC driver supplies devid/status/etc. */ 282 /* Get device info. MLC driver supplies devid/status/etc. */
283 serio->write(serio, 0); 283 serio_write(serio, 0);
284 serio->write(serio, 0); 284 serio_write(serio, 0);
285 serio->write(serio, HIL_PKT_CMD >> 8); 285 serio_write(serio, HIL_PKT_CMD >> 8);
286 serio->write(serio, HIL_CMD_IDD); 286 serio_write(serio, HIL_CMD_IDD);
287 down(&kbd->sem); 287 down(&kbd->sem);
288 288
289 serio->write(serio, 0); 289 serio_write(serio, 0);
290 serio->write(serio, 0); 290 serio_write(serio, 0);
291 serio->write(serio, HIL_PKT_CMD >> 8); 291 serio_write(serio, HIL_PKT_CMD >> 8);
292 serio->write(serio, HIL_CMD_RSC); 292 serio_write(serio, HIL_CMD_RSC);
293 down(&kbd->sem); 293 down(&kbd->sem);
294 294
295 serio->write(serio, 0); 295 serio_write(serio, 0);
296 serio->write(serio, 0); 296 serio_write(serio, 0);
297 serio->write(serio, HIL_PKT_CMD >> 8); 297 serio_write(serio, HIL_PKT_CMD >> 8);
298 serio->write(serio, HIL_CMD_RNM); 298 serio_write(serio, HIL_CMD_RNM);
299 down(&kbd->sem); 299 down(&kbd->sem);
300 300
301 serio->write(serio, 0); 301 serio_write(serio, 0);
302 serio->write(serio, 0); 302 serio_write(serio, 0);
303 serio->write(serio, HIL_PKT_CMD >> 8); 303 serio_write(serio, HIL_PKT_CMD >> 8);
304 serio->write(serio, HIL_CMD_EXD); 304 serio_write(serio, HIL_CMD_EXD);
305 down(&kbd->sem); 305 down(&kbd->sem);
306 306
307 up(&kbd->sem); 307 up(&kbd->sem);
@@ -350,10 +350,10 @@ static int hil_kbd_connect(struct serio *serio, struct serio_driver *drv)
350 printk(KERN_INFO "input: %s, ID: %d\n", 350 printk(KERN_INFO "input: %s, ID: %d\n",
351 kbd->dev->name, did); 351 kbd->dev->name, did);
352 352
353 serio->write(serio, 0); 353 serio_write(serio, 0);
354 serio->write(serio, 0); 354 serio_write(serio, 0);
355 serio->write(serio, HIL_PKT_CMD >> 8); 355 serio_write(serio, HIL_PKT_CMD >> 8);
356 serio->write(serio, HIL_CMD_EK1); /* Enable Keyswitch Autorepeat 1 */ 356 serio_write(serio, HIL_CMD_EK1); /* Enable Keyswitch Autorepeat 1 */
357 down(&kbd->sem); 357 down(&kbd->sem);
358 up(&kbd->sem); 358 up(&kbd->sem);
359 359
diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c
index 4730ef35c732..f9847e0fb553 100644
--- a/drivers/input/keyboard/lkkbd.c
+++ b/drivers/input/keyboard/lkkbd.c
@@ -525,12 +525,12 @@ lkkbd_event (struct input_dev *dev, unsigned int type, unsigned int code,
525 CHECK_LED (lk, leds_on, leds_off, LED_SCROLLL, LK_LED_SCROLLLOCK); 525 CHECK_LED (lk, leds_on, leds_off, LED_SCROLLL, LK_LED_SCROLLLOCK);
526 CHECK_LED (lk, leds_on, leds_off, LED_SLEEP, LK_LED_WAIT); 526 CHECK_LED (lk, leds_on, leds_off, LED_SLEEP, LK_LED_WAIT);
527 if (leds_on != 0) { 527 if (leds_on != 0) {
528 lk->serio->write (lk->serio, LK_CMD_LED_ON); 528 serio_write (lk->serio, LK_CMD_LED_ON);
529 lk->serio->write (lk->serio, leds_on); 529 serio_write (lk->serio, leds_on);
530 } 530 }
531 if (leds_off != 0) { 531 if (leds_off != 0) {
532 lk->serio->write (lk->serio, LK_CMD_LED_OFF); 532 serio_write (lk->serio, LK_CMD_LED_OFF);
533 lk->serio->write (lk->serio, leds_off); 533 serio_write (lk->serio, leds_off);
534 } 534 }
535 return 0; 535 return 0;
536 536
@@ -539,20 +539,20 @@ lkkbd_event (struct input_dev *dev, unsigned int type, unsigned int code,
539 case SND_CLICK: 539 case SND_CLICK:
540 if (value == 0) { 540 if (value == 0) {
541 DBG ("%s: Deactivating key clicks\n", __func__); 541 DBG ("%s: Deactivating key clicks\n", __func__);
542 lk->serio->write (lk->serio, LK_CMD_DISABLE_KEYCLICK); 542 serio_write (lk->serio, LK_CMD_DISABLE_KEYCLICK);
543 lk->serio->write (lk->serio, LK_CMD_DISABLE_CTRCLICK); 543 serio_write (lk->serio, LK_CMD_DISABLE_CTRCLICK);
544 } else { 544 } else {
545 DBG ("%s: Activating key clicks\n", __func__); 545 DBG ("%s: Activating key clicks\n", __func__);
546 lk->serio->write (lk->serio, LK_CMD_ENABLE_KEYCLICK); 546 serio_write (lk->serio, LK_CMD_ENABLE_KEYCLICK);
547 lk->serio->write (lk->serio, volume_to_hw (lk->keyclick_volume)); 547 serio_write (lk->serio, volume_to_hw (lk->keyclick_volume));
548 lk->serio->write (lk->serio, LK_CMD_ENABLE_CTRCLICK); 548 serio_write (lk->serio, LK_CMD_ENABLE_CTRCLICK);
549 lk->serio->write (lk->serio, volume_to_hw (lk->ctrlclick_volume)); 549 serio_write (lk->serio, volume_to_hw (lk->ctrlclick_volume));
550 } 550 }
551 return 0; 551 return 0;
552 552
553 case SND_BELL: 553 case SND_BELL:
554 if (value != 0) 554 if (value != 0)
555 lk->serio->write (lk->serio, LK_CMD_SOUND_BELL); 555 serio_write (lk->serio, LK_CMD_SOUND_BELL);
556 556
557 return 0; 557 return 0;
558 } 558 }
@@ -579,10 +579,10 @@ lkkbd_reinit (struct work_struct *work)
579 unsigned char leds_off = 0; 579 unsigned char leds_off = 0;
580 580
581 /* Ask for ID */ 581 /* Ask for ID */
582 lk->serio->write (lk->serio, LK_CMD_REQUEST_ID); 582 serio_write (lk->serio, LK_CMD_REQUEST_ID);
583 583
584 /* Reset parameters */ 584 /* Reset parameters */
585 lk->serio->write (lk->serio, LK_CMD_SET_DEFAULTS); 585 serio_write (lk->serio, LK_CMD_SET_DEFAULTS);
586 586
587 /* Set LEDs */ 587 /* Set LEDs */
588 CHECK_LED (lk, leds_on, leds_off, LED_CAPSL, LK_LED_SHIFTLOCK); 588 CHECK_LED (lk, leds_on, leds_off, LED_CAPSL, LK_LED_SHIFTLOCK);
@@ -590,12 +590,12 @@ lkkbd_reinit (struct work_struct *work)
590 CHECK_LED (lk, leds_on, leds_off, LED_SCROLLL, LK_LED_SCROLLLOCK); 590 CHECK_LED (lk, leds_on, leds_off, LED_SCROLLL, LK_LED_SCROLLLOCK);
591 CHECK_LED (lk, leds_on, leds_off, LED_SLEEP, LK_LED_WAIT); 591 CHECK_LED (lk, leds_on, leds_off, LED_SLEEP, LK_LED_WAIT);
592 if (leds_on != 0) { 592 if (leds_on != 0) {
593 lk->serio->write (lk->serio, LK_CMD_LED_ON); 593 serio_write (lk->serio, LK_CMD_LED_ON);
594 lk->serio->write (lk->serio, leds_on); 594 serio_write (lk->serio, leds_on);
595 } 595 }
596 if (leds_off != 0) { 596 if (leds_off != 0) {
597 lk->serio->write (lk->serio, LK_CMD_LED_OFF); 597 serio_write (lk->serio, LK_CMD_LED_OFF);
598 lk->serio->write (lk->serio, leds_off); 598 serio_write (lk->serio, leds_off);
599 } 599 }
600 600
601 /* 601 /*
@@ -603,31 +603,31 @@ lkkbd_reinit (struct work_struct *work)
603 * only work with a LK401 keyboard and grants access to 603 * only work with a LK401 keyboard and grants access to
604 * LAlt, RAlt, RCompose and RShift. 604 * LAlt, RAlt, RCompose and RShift.
605 */ 605 */
606 lk->serio->write (lk->serio, LK_CMD_ENABLE_LK401); 606 serio_write (lk->serio, LK_CMD_ENABLE_LK401);
607 607
608 /* Set all keys to UPDOWN mode */ 608 /* Set all keys to UPDOWN mode */
609 for (division = 1; division <= 14; division++) 609 for (division = 1; division <= 14; division++)
610 lk->serio->write (lk->serio, LK_CMD_SET_MODE (LK_MODE_UPDOWN, 610 serio_write (lk->serio, LK_CMD_SET_MODE (LK_MODE_UPDOWN,
611 division)); 611 division));
612 612
613 /* Enable bell and set volume */ 613 /* Enable bell and set volume */
614 lk->serio->write (lk->serio, LK_CMD_ENABLE_BELL); 614 serio_write (lk->serio, LK_CMD_ENABLE_BELL);
615 lk->serio->write (lk->serio, volume_to_hw (lk->bell_volume)); 615 serio_write (lk->serio, volume_to_hw (lk->bell_volume));
616 616
617 /* Enable/disable keyclick (and possibly set volume) */ 617 /* Enable/disable keyclick (and possibly set volume) */
618 if (test_bit (SND_CLICK, lk->dev->snd)) { 618 if (test_bit (SND_CLICK, lk->dev->snd)) {
619 lk->serio->write (lk->serio, LK_CMD_ENABLE_KEYCLICK); 619 serio_write (lk->serio, LK_CMD_ENABLE_KEYCLICK);
620 lk->serio->write (lk->serio, volume_to_hw (lk->keyclick_volume)); 620 serio_write (lk->serio, volume_to_hw (lk->keyclick_volume));
621 lk->serio->write (lk->serio, LK_CMD_ENABLE_CTRCLICK); 621 serio_write (lk->serio, LK_CMD_ENABLE_CTRCLICK);
622 lk->serio->write (lk->serio, volume_to_hw (lk->ctrlclick_volume)); 622 serio_write (lk->serio, volume_to_hw (lk->ctrlclick_volume));
623 } else { 623 } else {
624 lk->serio->write (lk->serio, LK_CMD_DISABLE_KEYCLICK); 624 serio_write (lk->serio, LK_CMD_DISABLE_KEYCLICK);
625 lk->serio->write (lk->serio, LK_CMD_DISABLE_CTRCLICK); 625 serio_write (lk->serio, LK_CMD_DISABLE_CTRCLICK);
626 } 626 }
627 627
628 /* Sound the bell if needed */ 628 /* Sound the bell if needed */
629 if (test_bit (SND_BELL, lk->dev->snd)) 629 if (test_bit (SND_BELL, lk->dev->snd))
630 lk->serio->write (lk->serio, LK_CMD_SOUND_BELL); 630 serio_write (lk->serio, LK_CMD_SOUND_BELL);
631} 631}
632 632
633/* 633/*
@@ -684,8 +684,10 @@ lkkbd_connect (struct serio *serio, struct serio_driver *drv)
684 input_dev->keycode = lk->keycode; 684 input_dev->keycode = lk->keycode;
685 input_dev->keycodesize = sizeof (lk_keycode_t); 685 input_dev->keycodesize = sizeof (lk_keycode_t);
686 input_dev->keycodemax = LK_NUM_KEYCODES; 686 input_dev->keycodemax = LK_NUM_KEYCODES;
687
687 for (i = 0; i < LK_NUM_KEYCODES; i++) 688 for (i = 0; i < LK_NUM_KEYCODES; i++)
688 set_bit (lk->keycode[i], input_dev->keybit); 689 __set_bit (lk->keycode[i], input_dev->keybit);
690 __clear_bit(KEY_RESERVED, input_dev->keybit);
689 691
690 serio_set_drvdata (serio, lk); 692 serio_set_drvdata (serio, lk);
691 693
@@ -697,7 +699,7 @@ lkkbd_connect (struct serio *serio, struct serio_driver *drv)
697 if (err) 699 if (err)
698 goto fail3; 700 goto fail3;
699 701
700 lk->serio->write (lk->serio, LK_CMD_POWERCYCLE_RESET); 702 serio_write (lk->serio, LK_CMD_POWERCYCLE_RESET);
701 703
702 return 0; 704 return 0;
703 705
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
index 9fce6d1e29b2..e7aa935a294a 100644
--- a/drivers/input/keyboard/sunkbd.c
+++ b/drivers/input/keyboard/sunkbd.c
@@ -150,8 +150,8 @@ static int sunkbd_event(struct input_dev *dev, unsigned int type, unsigned int c
150 150
151 case EV_LED: 151 case EV_LED:
152 152
153 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_SETLED); 153 serio_write(sunkbd->serio, SUNKBD_CMD_SETLED);
154 sunkbd->serio->write(sunkbd->serio, 154 serio_write(sunkbd->serio,
155 (!!test_bit(LED_CAPSL, dev->led) << 3) | (!!test_bit(LED_SCROLLL, dev->led) << 2) | 155 (!!test_bit(LED_CAPSL, dev->led) << 3) | (!!test_bit(LED_SCROLLL, dev->led) << 2) |
156 (!!test_bit(LED_COMPOSE, dev->led) << 1) | !!test_bit(LED_NUML, dev->led)); 156 (!!test_bit(LED_COMPOSE, dev->led) << 1) | !!test_bit(LED_NUML, dev->led));
157 return 0; 157 return 0;
@@ -161,11 +161,11 @@ static int sunkbd_event(struct input_dev *dev, unsigned int type, unsigned int c
161 switch (code) { 161 switch (code) {
162 162
163 case SND_CLICK: 163 case SND_CLICK:
164 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_NOCLICK - value); 164 serio_write(sunkbd->serio, SUNKBD_CMD_NOCLICK - value);
165 return 0; 165 return 0;
166 166
167 case SND_BELL: 167 case SND_BELL:
168 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_BELLOFF - value); 168 serio_write(sunkbd->serio, SUNKBD_CMD_BELLOFF - value);
169 return 0; 169 return 0;
170 } 170 }
171 171
@@ -183,7 +183,7 @@ static int sunkbd_event(struct input_dev *dev, unsigned int type, unsigned int c
183static int sunkbd_initialize(struct sunkbd *sunkbd) 183static int sunkbd_initialize(struct sunkbd *sunkbd)
184{ 184{
185 sunkbd->reset = -2; 185 sunkbd->reset = -2;
186 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_RESET); 186 serio_write(sunkbd->serio, SUNKBD_CMD_RESET);
187 wait_event_interruptible_timeout(sunkbd->wait, sunkbd->reset >= 0, HZ); 187 wait_event_interruptible_timeout(sunkbd->wait, sunkbd->reset >= 0, HZ);
188 if (sunkbd->reset < 0) 188 if (sunkbd->reset < 0)
189 return -1; 189 return -1;
@@ -192,7 +192,7 @@ static int sunkbd_initialize(struct sunkbd *sunkbd)
192 192
193 if (sunkbd->type == 4) { /* Type 4 keyboard */ 193 if (sunkbd->type == 4) { /* Type 4 keyboard */
194 sunkbd->layout = -2; 194 sunkbd->layout = -2;
195 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_LAYOUT); 195 serio_write(sunkbd->serio, SUNKBD_CMD_LAYOUT);
196 wait_event_interruptible_timeout(sunkbd->wait, sunkbd->layout >= 0, HZ/4); 196 wait_event_interruptible_timeout(sunkbd->wait, sunkbd->layout >= 0, HZ/4);
197 if (sunkbd->layout < 0) return -1; 197 if (sunkbd->layout < 0) return -1;
198 if (sunkbd->layout & SUNKBD_LAYOUT_5_MASK) sunkbd->type = 5; 198 if (sunkbd->layout & SUNKBD_LAYOUT_5_MASK) sunkbd->type = 5;
@@ -212,12 +212,14 @@ static void sunkbd_reinit(struct work_struct *work)
212 212
213 wait_event_interruptible_timeout(sunkbd->wait, sunkbd->reset >= 0, HZ); 213 wait_event_interruptible_timeout(sunkbd->wait, sunkbd->reset >= 0, HZ);
214 214
215 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_SETLED); 215 serio_write(sunkbd->serio, SUNKBD_CMD_SETLED);
216 sunkbd->serio->write(sunkbd->serio, 216 serio_write(sunkbd->serio,
217 (!!test_bit(LED_CAPSL, sunkbd->dev->led) << 3) | (!!test_bit(LED_SCROLLL, sunkbd->dev->led) << 2) | 217 (!!test_bit(LED_CAPSL, sunkbd->dev->led) << 3) |
218 (!!test_bit(LED_COMPOSE, sunkbd->dev->led) << 1) | !!test_bit(LED_NUML, sunkbd->dev->led)); 218 (!!test_bit(LED_SCROLLL, sunkbd->dev->led) << 2) |
219 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_NOCLICK - !!test_bit(SND_CLICK, sunkbd->dev->snd)); 219 (!!test_bit(LED_COMPOSE, sunkbd->dev->led) << 1) |
220 sunkbd->serio->write(sunkbd->serio, SUNKBD_CMD_BELLOFF - !!test_bit(SND_BELL, sunkbd->dev->snd)); 220 !!test_bit(LED_NUML, sunkbd->dev->led));
221 serio_write(sunkbd->serio, SUNKBD_CMD_NOCLICK - !!test_bit(SND_CLICK, sunkbd->dev->snd));
222 serio_write(sunkbd->serio, SUNKBD_CMD_BELLOFF - !!test_bit(SND_BELL, sunkbd->dev->snd));
221} 223}
222 224
223static void sunkbd_enable(struct sunkbd *sunkbd, int enable) 225static void sunkbd_enable(struct sunkbd *sunkbd, int enable)
diff --git a/drivers/input/mouse/hil_ptr.c b/drivers/input/mouse/hil_ptr.c
index 3263ce083bf0..cd12c2d8fa0b 100644
--- a/drivers/input/mouse/hil_ptr.c
+++ b/drivers/input/mouse/hil_ptr.c
@@ -273,28 +273,28 @@ static int hil_ptr_connect(struct serio *serio, struct serio_driver *driver)
273 init_MUTEX_LOCKED(&ptr->sem); 273 init_MUTEX_LOCKED(&ptr->sem);
274 274
275 /* Get device info. MLC driver supplies devid/status/etc. */ 275 /* Get device info. MLC driver supplies devid/status/etc. */
276 serio->write(serio, 0); 276 serio_write(serio, 0);
277 serio->write(serio, 0); 277 serio_write(serio, 0);
278 serio->write(serio, HIL_PKT_CMD >> 8); 278 serio_write(serio, HIL_PKT_CMD >> 8);
279 serio->write(serio, HIL_CMD_IDD); 279 serio_write(serio, HIL_CMD_IDD);
280 down(&ptr->sem); 280 down(&ptr->sem);
281 281
282 serio->write(serio, 0); 282 serio_write(serio, 0);
283 serio->write(serio, 0); 283 serio_write(serio, 0);
284 serio->write(serio, HIL_PKT_CMD >> 8); 284 serio_write(serio, HIL_PKT_CMD >> 8);
285 serio->write(serio, HIL_CMD_RSC); 285 serio_write(serio, HIL_CMD_RSC);
286 down(&ptr->sem); 286 down(&ptr->sem);
287 287
288 serio->write(serio, 0); 288 serio_write(serio, 0);
289 serio->write(serio, 0); 289 serio_write(serio, 0);
290 serio->write(serio, HIL_PKT_CMD >> 8); 290 serio_write(serio, HIL_PKT_CMD >> 8);
291 serio->write(serio, HIL_CMD_RNM); 291 serio_write(serio, HIL_CMD_RNM);
292 down(&ptr->sem); 292 down(&ptr->sem);
293 293
294 serio->write(serio, 0); 294 serio_write(serio, 0);
295 serio->write(serio, 0); 295 serio_write(serio, 0);
296 serio->write(serio, HIL_PKT_CMD >> 8); 296 serio_write(serio, HIL_PKT_CMD >> 8);
297 serio->write(serio, HIL_CMD_EXD); 297 serio_write(serio, HIL_CMD_EXD);
298 down(&ptr->sem); 298 down(&ptr->sem);
299 299
300 up(&ptr->sem); 300 up(&ptr->sem);
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c
index 404eedd5ffa2..70111443678e 100644
--- a/drivers/input/mouse/vsxxxaa.c
+++ b/drivers/input/mouse/vsxxxaa.c
@@ -384,11 +384,11 @@ vsxxxaa_handle_POR_packet (struct vsxxxaa *mouse)
384 printk (KERN_NOTICE "%s on %s: Forceing standard packet format, " 384 printk (KERN_NOTICE "%s on %s: Forceing standard packet format, "
385 "incremental streaming mode and 72 samples/sec\n", 385 "incremental streaming mode and 72 samples/sec\n",
386 mouse->name, mouse->phys); 386 mouse->name, mouse->phys);
387 mouse->serio->write (mouse->serio, 'S'); /* Standard format */ 387 serio_write (mouse->serio, 'S'); /* Standard format */
388 mdelay (50); 388 mdelay (50);
389 mouse->serio->write (mouse->serio, 'R'); /* Incremental */ 389 serio_write (mouse->serio, 'R'); /* Incremental */
390 mdelay (50); 390 mdelay (50);
391 mouse->serio->write (mouse->serio, 'L'); /* 72 samples/sec */ 391 serio_write (mouse->serio, 'L'); /* 72 samples/sec */
392} 392}
393 393
394static void 394static void
@@ -532,7 +532,7 @@ vsxxxaa_connect (struct serio *serio, struct serio_driver *drv)
532 * Request selftest. Standard packet format and differential 532 * Request selftest. Standard packet format and differential
533 * mode will be requested after the device ID'ed successfully. 533 * mode will be requested after the device ID'ed successfully.
534 */ 534 */
535 serio->write (serio, 'T'); /* Test */ 535 serio_write (serio, 'T'); /* Test */
536 536
537 err = input_register_device (input_dev); 537 err = input_register_device (input_dev);
538 if (err) 538 if (err)
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
index 4d3139e2099d..b4d7f63deff1 100644
--- a/drivers/input/touchscreen/h3600_ts_input.c
+++ b/drivers/input/touchscreen/h3600_ts_input.c
@@ -148,9 +148,10 @@ unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr)
148 struct h3600_dev *ts = input_get_drvdata(dev); 148 struct h3600_dev *ts = input_get_drvdata(dev);
149 149
150 /* Must be in this order */ 150 /* Must be in this order */
151 ts->serio->write(ts->serio, 1); 151 serio_write(ts->serio, 1);
152 ts->serio->write(ts->serio, pwr); 152 serio_write(ts->serio, pwr);
153 ts->serio->write(ts->serio, brightness); 153 serio_write(ts->serio, brightness);
154
154 return 0; 155 return 0;
155} 156}
156 157
@@ -262,7 +263,7 @@ static int h3600ts_event(struct input_dev *dev, unsigned int type,
262 263
263 switch (type) { 264 switch (type) {
264 case EV_LED: { 265 case EV_LED: {
265 // ts->serio->write(ts->serio, SOME_CMD); 266 // serio_write(ts->serio, SOME_CMD);
266 return 0; 267 return 0;
267 } 268 }
268 } 269 }