diff options
author | Jens Taprogge <jens.taprogge@taprogge.org> | 2012-09-12 08:55:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-12 12:54:15 -0400 |
commit | 9b27adbced2455bfd7e5d1b76a7f151de3d25dec (patch) | |
tree | 11b5738793217c4ffc14d2031e0a5d31439fc7bf | |
parent | 0118681b2bc2f182b7cd4c6569632cf2729cc73e (diff) |
Staging: ipack/bridges/tpci200: Remove side effects of tpci200_{request,free}_irq.
Use the __tpci200_{set,clear}_mask routines to access control
register. Do not overwrite flags unrelated to interrupt handling.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/ipack/bridges/tpci200.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 25605196dbac..3285dade2dd8 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c | |||
@@ -278,37 +278,18 @@ out_disable_pci: | |||
278 | static int __tpci200_request_irq(struct tpci200_board *tpci200, | 278 | static int __tpci200_request_irq(struct tpci200_board *tpci200, |
279 | struct ipack_device *dev) | 279 | struct ipack_device *dev) |
280 | { | 280 | { |
281 | unsigned short slot_ctrl; | 281 | __tpci200_set_mask( |
282 | 282 | &tpci200->info->interface_regs->control[dev->slot], | |
283 | /* Set the default parameters of the slot | 283 | TPCI200_INT0_EN | TPCI200_INT1_EN); |
284 | * INT0 enabled, level sensitive | ||
285 | * INT1 enabled, level sensitive | ||
286 | * error interrupt disabled | ||
287 | * timeout interrupt disabled | ||
288 | * recover time disabled | ||
289 | * clock rate 8 MHz | ||
290 | */ | ||
291 | slot_ctrl = TPCI200_INT0_EN | TPCI200_INT1_EN; | ||
292 | writew(slot_ctrl, &tpci200->info->interface_regs->control[dev->slot]); | ||
293 | |||
294 | return 0; | 284 | return 0; |
295 | } | 285 | } |
296 | 286 | ||
297 | static void __tpci200_free_irq(struct tpci200_board *tpci200, | 287 | static void __tpci200_free_irq(struct tpci200_board *tpci200, |
298 | struct ipack_device *dev) | 288 | struct ipack_device *dev) |
299 | { | 289 | { |
300 | unsigned short slot_ctrl; | 290 | __tpci200_clear_mask( |
301 | 291 | &tpci200->info->interface_regs->control[dev->slot], | |
302 | /* Set the default parameters of the slot | 292 | TPCI200_INT0_EN | TPCI200_INT1_EN); |
303 | * INT0 disabled, level sensitive | ||
304 | * INT1 disabled, level sensitive | ||
305 | * error interrupt disabled | ||
306 | * timeout interrupt disabled | ||
307 | * recover time disabled | ||
308 | * clock rate 8 MHz | ||
309 | */ | ||
310 | slot_ctrl = 0; | ||
311 | writew(slot_ctrl, &tpci200->info->interface_regs->control[dev->slot]); | ||
312 | } | 293 | } |
313 | 294 | ||
314 | static int tpci200_free_irq(struct ipack_device *dev) | 295 | static int tpci200_free_irq(struct ipack_device *dev) |