Staging: ipack/bridges/tpci200: remove unneeded casts
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c63a7dd0e5
commit
dd8a95ed16
1 changed files with 16 additions and 20 deletions
|
@ -321,8 +321,8 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)
|
||||||
spin_lock_irqsave(&tpci200->info->access_lock, flags);
|
spin_lock_irqsave(&tpci200->info->access_lock, flags);
|
||||||
|
|
||||||
/* Read status register */
|
/* Read status register */
|
||||||
status_reg = readw((void __iomem *) (tpci200->info->interface_regs +
|
status_reg = readw(tpci200->info->interface_regs +
|
||||||
TPCI200_STATUS_REG));
|
TPCI200_STATUS_REG);
|
||||||
|
|
||||||
if (status_reg & TPCI200_SLOT_INT_MASK) {
|
if (status_reg & TPCI200_SLOT_INT_MASK) {
|
||||||
unhandled_ints = status_reg & TPCI200_SLOT_INT_MASK;
|
unhandled_ints = status_reg & TPCI200_SLOT_INT_MASK;
|
||||||
|
@ -334,12 +334,10 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)
|
||||||
ret = tpci200->slots[i].irq->handler(tpci200->slots[i].irq->arg);
|
ret = tpci200->slots[i].irq->handler(tpci200->slots[i].irq->arg);
|
||||||
|
|
||||||
/* Dummy reads */
|
/* Dummy reads */
|
||||||
readw((void __iomem *)
|
readw(tpci200->slots[i].dev->io_space.address +
|
||||||
(tpci200->slots[i].dev->io_space.address +
|
0xC0);
|
||||||
0xC0));
|
readw(tpci200->slots[i].dev->io_space.address +
|
||||||
readw((void __iomem *)
|
0xC2);
|
||||||
(tpci200->slots[i].dev->io_space.address +
|
|
||||||
0xC2));
|
|
||||||
|
|
||||||
unhandled_ints &= ~(((TPCI200_A_INT0 | TPCI200_A_INT1) << (2*i)));
|
unhandled_ints &= ~(((TPCI200_A_INT0 | TPCI200_A_INT1) << (2*i)));
|
||||||
}
|
}
|
||||||
|
@ -352,12 +350,12 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)
|
||||||
pr_info("No registered ISR for slot [%d:%d]!. IRQ will be disabled.\n",
|
pr_info("No registered ISR for slot [%d:%d]!. IRQ will be disabled.\n",
|
||||||
tpci200->number, i);
|
tpci200->number, i);
|
||||||
reg_value = readw(
|
reg_value = readw(
|
||||||
(void __iomem *)(tpci200->info->interface_regs +
|
tpci200->info->interface_regs +
|
||||||
control_reg[i]));
|
control_reg[i]);
|
||||||
reg_value &=
|
reg_value &=
|
||||||
~(TPCI200_INT0_EN | TPCI200_INT1_EN);
|
~(TPCI200_INT0_EN | TPCI200_INT1_EN);
|
||||||
writew(reg_value,
|
writew(reg_value,
|
||||||
(void __iomem *)(tpci200->info->interface_regs +
|
(tpci200->info->interface_regs +
|
||||||
control_reg[i]));
|
control_reg[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -659,8 +657,7 @@ static int tpci200_register(struct tpci200_board *tpci200)
|
||||||
(void __iomem *)mem_base + TPCI200_MEM8_GAP*i;
|
(void __iomem *)mem_base + TPCI200_MEM8_GAP*i;
|
||||||
tpci200->slots[i].mem_phys.size = TPCI200_MEM8_SIZE;
|
tpci200->slots[i].mem_phys.size = TPCI200_MEM8_SIZE;
|
||||||
|
|
||||||
writew(slot_ctrl,
|
writew(slot_ctrl, (tpci200->info->interface_regs +
|
||||||
(void __iomem *)(tpci200->info->interface_regs +
|
|
||||||
control_reg[i]));
|
control_reg[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +700,7 @@ static int __tpci200_request_irq(struct tpci200_board *tpci200,
|
||||||
* clock rate 8 MHz
|
* clock rate 8 MHz
|
||||||
*/
|
*/
|
||||||
slot_ctrl = TPCI200_INT0_EN | TPCI200_INT1_EN;
|
slot_ctrl = TPCI200_INT0_EN | TPCI200_INT1_EN;
|
||||||
writew(slot_ctrl, (void __iomem *)(tpci200->info->interface_regs +
|
writew(slot_ctrl, (tpci200->info->interface_regs +
|
||||||
control_reg[dev->slot]));
|
control_reg[dev->slot]));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -723,8 +720,7 @@ static void __tpci200_free_irq(struct tpci200_board *tpci200,
|
||||||
* clock rate 8 MHz
|
* clock rate 8 MHz
|
||||||
*/
|
*/
|
||||||
slot_ctrl = 0;
|
slot_ctrl = 0;
|
||||||
writew(slot_ctrl,
|
writew(slot_ctrl, (tpci200->info->interface_regs +
|
||||||
(void __iomem *)(tpci200->info->interface_regs +
|
|
||||||
control_reg[dev->slot]));
|
control_reg[dev->slot]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue