[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1347454546-23236-2-git-send-email-siglesias@igalia.com>
Date: Wed, 12 Sep 2012 14:55:24 +0200
From: Samuel Iglesias Gonsalvez <siglesias@...lia.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
industrypack-devel@...ts.sourceforge.net,
Jens Taprogge <jens.taprogge@...rogge.org>,
Samuel Iglesias Gonsalvez <siglesias@...lia.com>
Subject: [PATCH 02/24] Staging: ipack/bridges/tpci200: Remove side effects of tpci200_{request,free}_irq.
From: Jens Taprogge <jens.taprogge@...rogge.org>
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@...rogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@...lia.com>
---
drivers/staging/ipack/bridges/tpci200.c | 31 ++++++-------------------------
1 file changed, 6 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index 2560519..3285dad 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)
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists