diff options
Diffstat (limited to 'drivers/input/touchscreen/hp680_ts_input.c')
-rw-r--r-- | drivers/input/touchscreen/hp680_ts_input.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c index a89700e7ace4..dd4e8f020b99 100644 --- a/drivers/input/touchscreen/hp680_ts_input.c +++ b/drivers/input/touchscreen/hp680_ts_input.c | |||
@@ -28,29 +28,29 @@ static void do_softint(struct work_struct *work) | |||
28 | u8 scpdr; | 28 | u8 scpdr; |
29 | int touched = 0; | 29 | int touched = 0; |
30 | 30 | ||
31 | if (ctrl_inb(PHDR) & PHDR_TS_PEN_DOWN) { | 31 | if (__raw_readb(PHDR) & PHDR_TS_PEN_DOWN) { |
32 | scpdr = ctrl_inb(SCPDR); | 32 | scpdr = __raw_readb(SCPDR); |
33 | scpdr |= SCPDR_TS_SCAN_ENABLE; | 33 | scpdr |= SCPDR_TS_SCAN_ENABLE; |
34 | scpdr &= ~SCPDR_TS_SCAN_Y; | 34 | scpdr &= ~SCPDR_TS_SCAN_Y; |
35 | ctrl_outb(scpdr, SCPDR); | 35 | __raw_writeb(scpdr, SCPDR); |
36 | udelay(30); | 36 | udelay(30); |
37 | 37 | ||
38 | absy = adc_single(ADC_CHANNEL_TS_Y); | 38 | absy = adc_single(ADC_CHANNEL_TS_Y); |
39 | 39 | ||
40 | scpdr = ctrl_inb(SCPDR); | 40 | scpdr = __raw_readb(SCPDR); |
41 | scpdr |= SCPDR_TS_SCAN_Y; | 41 | scpdr |= SCPDR_TS_SCAN_Y; |
42 | scpdr &= ~SCPDR_TS_SCAN_X; | 42 | scpdr &= ~SCPDR_TS_SCAN_X; |
43 | ctrl_outb(scpdr, SCPDR); | 43 | __raw_writeb(scpdr, SCPDR); |
44 | udelay(30); | 44 | udelay(30); |
45 | 45 | ||
46 | absx = adc_single(ADC_CHANNEL_TS_X); | 46 | absx = adc_single(ADC_CHANNEL_TS_X); |
47 | 47 | ||
48 | scpdr = ctrl_inb(SCPDR); | 48 | scpdr = __raw_readb(SCPDR); |
49 | scpdr |= SCPDR_TS_SCAN_X; | 49 | scpdr |= SCPDR_TS_SCAN_X; |
50 | scpdr &= ~SCPDR_TS_SCAN_ENABLE; | 50 | scpdr &= ~SCPDR_TS_SCAN_ENABLE; |
51 | ctrl_outb(scpdr, SCPDR); | 51 | __raw_writeb(scpdr, SCPDR); |
52 | udelay(100); | 52 | udelay(100); |
53 | touched = ctrl_inb(PHDR) & PHDR_TS_PEN_DOWN; | 53 | touched = __raw_readb(PHDR) & PHDR_TS_PEN_DOWN; |
54 | } | 54 | } |
55 | 55 | ||
56 | if (touched) { | 56 | if (touched) { |
@@ -107,8 +107,7 @@ static int __init hp680_ts_init(void) | |||
107 | return 0; | 107 | return 0; |
108 | 108 | ||
109 | fail2: free_irq(HP680_TS_IRQ, NULL); | 109 | fail2: free_irq(HP680_TS_IRQ, NULL); |
110 | cancel_delayed_work(&work); | 110 | cancel_delayed_work_sync(&work); |
111 | flush_scheduled_work(); | ||
112 | fail1: input_free_device(hp680_ts_dev); | 111 | fail1: input_free_device(hp680_ts_dev); |
113 | return err; | 112 | return err; |
114 | } | 113 | } |
@@ -116,8 +115,7 @@ static int __init hp680_ts_init(void) | |||
116 | static void __exit hp680_ts_exit(void) | 115 | static void __exit hp680_ts_exit(void) |
117 | { | 116 | { |
118 | free_irq(HP680_TS_IRQ, NULL); | 117 | free_irq(HP680_TS_IRQ, NULL); |
119 | cancel_delayed_work(&work); | 118 | cancel_delayed_work_sync(&work); |
120 | flush_scheduled_work(); | ||
121 | input_unregister_device(hp680_ts_dev); | 119 | input_unregister_device(hp680_ts_dev); |
122 | } | 120 | } |
123 | 121 | ||