aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-09-16 04:06:42 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-09-18 02:24:01 -0400
commit3b0a9ce0a6918e881c3f44bf1fc2194a8d019104 (patch)
tree9e34534d017f88ec1742cb8fd42e88abb230c57d /drivers
parent30b37131aa63f4f73ebc48a026666448e5907255 (diff)
Input: dm355evm_keys - remove dm355evm_keys_hardirq
The genirq already provides default hard IRQ handler for threaded IRQs, no need to implement our own here. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/misc/dm355evm_keys.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c
index 0918acae584a..f2b67dc81d80 100644
--- a/drivers/input/misc/dm355evm_keys.c
+++ b/drivers/input/misc/dm355evm_keys.c
@@ -96,7 +96,13 @@ static struct {
96 { 0x3169, KEY_PAUSE, }, 96 { 0x3169, KEY_PAUSE, },
97}; 97};
98 98
99/* runs in an IRQ thread -- can (and will!) sleep */ 99/*
100 * Because we communicate with the MSP430 using I2C, and all I2C calls
101 * in Linux sleep, we use a threaded IRQ handler. The IRQ itself is
102 * active low, but we go through the GPIO controller so we can trigger
103 * on falling edges and not worry about enabling/disabling the IRQ in
104 * the keypress handling path.
105 */
100static irqreturn_t dm355evm_keys_irq(int irq, void *_keys) 106static irqreturn_t dm355evm_keys_irq(int irq, void *_keys)
101{ 107{
102 struct dm355evm_keys *keys = _keys; 108 struct dm355evm_keys *keys = _keys;
@@ -171,18 +177,6 @@ static irqreturn_t dm355evm_keys_irq(int irq, void *_keys)
171 return IRQ_HANDLED; 177 return IRQ_HANDLED;
172} 178}
173 179
174/*
175 * Because we communicate with the MSP430 using I2C, and all I2C calls
176 * in Linux sleep, we use a threaded IRQ handler. The IRQ itself is
177 * active low, but we go through the GPIO controller so we can trigger
178 * on falling edges and not worry about enabling/disabling the IRQ in
179 * the keypress handling path.
180 */
181static irqreturn_t dm355evm_keys_hardirq(int irq, void *_keys)
182{
183 return IRQ_WAKE_THREAD;
184}
185
186static int dm355evm_setkeycode(struct input_dev *dev, int index, int keycode) 180static int dm355evm_setkeycode(struct input_dev *dev, int index, int keycode)
187{ 181{
188 u16 old_keycode; 182 u16 old_keycode;
@@ -257,10 +251,8 @@ static int __devinit dm355evm_keys_probe(struct platform_device *pdev)
257 251
258 /* REVISIT: flush the event queue? */ 252 /* REVISIT: flush the event queue? */
259 253
260 status = request_threaded_irq(keys->irq, 254 status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq,
261 dm355evm_keys_hardirq, dm355evm_keys_irq, 255 IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), keys);
262 IRQF_TRIGGER_FALLING,
263 dev_name(&pdev->dev), keys);
264 if (status < 0) 256 if (status < 0)
265 goto fail1; 257 goto fail1;
266 258