summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJens Taprogge <jens.taprogge@taprogge.org>2012-09-12 14:55:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-12 09:54:15 -0700
commit9b27adbced2455bfd7e5d1b76a7f151de3d25dec (patch)
tree11b5738793217c4ffc14d2031e0a5d31439fc7bf /drivers
parent0118681b2bc2f182b7cd4c6569632cf2729cc73e (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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/ipack/bridges/tpci200.c31
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:
static int __tpci200_request_irq(struct tpci200_board *tpci200,
struct ipack_device *dev)
{
- unsigned short slot_ctrl;
-
- /* Set the default parameters of the slot
- * INT0 enabled, level sensitive
- * INT1 enabled, level sensitive
- * error interrupt disabled
- * timeout interrupt disabled
- * recover time disabled
- * clock rate 8 MHz
- */
- slot_ctrl = TPCI200_INT0_EN | TPCI200_INT1_EN;
- writew(slot_ctrl, &tpci200->info->interface_regs->control[dev->slot]);
-
+ __tpci200_set_mask(
+ &tpci200->info->interface_regs->control[dev->slot],
+ TPCI200_INT0_EN | TPCI200_INT1_EN);
return 0;
}
static void __tpci200_free_irq(struct tpci200_board *tpci200,
struct ipack_device *dev)
{
- unsigned short slot_ctrl;
-
- /* Set the default parameters of the slot
- * INT0 disabled, level sensitive
- * INT1 disabled, level sensitive
- * error interrupt disabled
- * timeout interrupt disabled
- * recover time disabled
- * clock rate 8 MHz
- */
- slot_ctrl = 0;
- writew(slot_ctrl, &tpci200->info->interface_regs->control[dev->slot]);
+ __tpci200_clear_mask(
+ &tpci200->info->interface_regs->control[dev->slot],
+ TPCI200_INT0_EN | TPCI200_INT1_EN);
}
static int tpci200_free_irq(struct ipack_device *dev)