Commit 5a43c09d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6

* 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/isdn/act2000: kill irq2card_map
  drivers/net/eepro: kill dead code
  Various drivers' irq handlers: kill dead code, needless casts
  drivers/net: eliminate irq handler impossible checks, needless casts
  arch/i386/kernel/time: don't shadow 'irq' function arg
parents 659564c8 5d347c8a
......@@ -201,8 +201,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
high bit of the PPI port B (0x61). Note that some PS/2s,
notably the 55SX, work fine if this is removed. */
irq = inb_p( 0x61 ); /* read the current state */
outb_p( irq|0x80, 0x61 ); /* reset the IRQ */
u8 irq_v = inb_p( 0x61 ); /* read the current state */
outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */
}
write_sequnlock(&xtime_lock);
......
......@@ -862,15 +862,10 @@ static inline void interrupts_off (amb_dev * dev) {
/********** interrupt handling **********/
static irqreturn_t interrupt_handler(int irq, void *dev_id) {
amb_dev * dev = (amb_dev *) dev_id;
amb_dev * dev = dev_id;
PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id);
if (!dev_id) {
PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq);
return IRQ_NONE;
}
{
u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt));
......
......@@ -1389,15 +1389,6 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) {
PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id);
if (!dev_id) {
PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq);
return IRQ_NONE;
}
if (irq != dev->irq) {
PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq);
return IRQ_NONE;
}
// definitely for us
irq_ok = 0;
while ((int_source = rd_regl (dev, INT_SOURCE_REG_OFF)
......
......@@ -1892,11 +1892,9 @@ static inline void lanai_int_1(struct lanai_dev *lanai, u32 reason)
static irqreturn_t lanai_int(int irq, void *devid)
{
struct lanai_dev *lanai = (struct lanai_dev *) devid;
struct lanai_dev *lanai = devid;
u32 reason;
(void) irq; /* unused variables */
#ifdef USE_POWERDOWN
/*
* If we're powered down we shouldn't be generating any interrupts -
......
......@@ -5254,7 +5254,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
DAC960_V2_StatusMailbox_T *NextStatusMailbox;
unsigned long flags;
......@@ -5295,7 +5295,7 @@ static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel,
static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
DAC960_V2_StatusMailbox_T *NextStatusMailbox;
unsigned long flags;
......@@ -5337,7 +5337,7 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
DAC960_V2_StatusMailbox_T *NextStatusMailbox;
unsigned long flags;
......@@ -5379,7 +5379,7 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
DAC960_V1_StatusMailbox_T *NextStatusMailbox;
unsigned long flags;
......@@ -5417,7 +5417,7 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
DAC960_V1_StatusMailbox_T *NextStatusMailbox;
unsigned long flags;
......@@ -5455,7 +5455,7 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
unsigned long flags;
......@@ -5493,7 +5493,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel,
void *DeviceIdentifier)
{
DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
DAC960_Controller_T *Controller = DeviceIdentifier;
void __iomem *ControllerBaseAddress = Controller->BaseAddress;
unsigned long flags;
......
......@@ -850,10 +850,6 @@ static irqreturn_t mcdx_intr(int irq, void *dev_id)
struct s_drive_stuff *stuffp = dev_id;
unsigned char b;
if (stuffp == NULL) {
xwarn("mcdx: no device for intr %d\n", irq);
return IRQ_NONE;
}
#ifdef AK2
if (!stuffp->busy && stuffp->pending)
stuffp->int_err = 1;
......
......@@ -88,7 +88,7 @@ void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int);
/* riointr.c */
void RIOTxEnable(char *);
void RIOServiceHost(struct rio_info *, struct Host *, int);
void RIOServiceHost(struct rio_info *, struct Host *);
int riotproc(struct rio_info *, struct ttystatics *, int, int);
/* rioparam.c */
......
......@@ -368,7 +368,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr)
struct Host *HostP;
func_enter();
HostP = (struct Host *) ptr; /* &p->RIOHosts[(long)ptr]; */
HostP = ptr; /* &p->RIOHosts[(long)ptr]; */
rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec);
/* AAargh! The order in which to do these things is essential and
......@@ -402,7 +402,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr)
return IRQ_HANDLED;
}
RIOServiceHost(p, HostP, irq);
RIOServiceHost(p, HostP);
rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type);
......
......@@ -181,7 +181,7 @@ static int RupIntr;
static int RxIntr;
static int TxIntr;
void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
void RIOServiceHost(struct rio_info *p, struct Host *HostP)
{
rio_spin_lock(&HostP->HostLock);
if ((HostP->Flags & RUN_STATE) != RC_RUNNING) {
......
......@@ -559,11 +559,10 @@ static irqreturn_t rc_interrupt(int irq, void * dev_id)
int handled = 0;
bp = IRQ_to_board[irq];
if (!bp || !(bp->flags & RC_BOARD_ACTIVE)) {
if (!(bp->flags & RC_BOARD_ACTIVE))
return IRQ_NONE;
}
while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) &
(RC_BSR_TOUT | RC_BSR_TINT |
RC_BSR_MINT | RC_BSR_RINT))) {
......
......@@ -912,7 +912,7 @@ static irqreturn_t sx_interrupt(int irq, void *dev_id)
spin_lock_irqsave(&bp->lock, flags);
dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1);
if (!bp || !(bp->flags & SX_BOARD_ACTIVE)) {
if (!(bp->flags & SX_BOARD_ACTIVE)) {
dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq);
spin_unlock_irqrestore(&bp->lock, flags);
func_exit();
......
......@@ -16,8 +16,6 @@
#include "act2000_isa.h"
#include "capi.h"
static act2000_card *irq2card_map[16];
/*
* Reset Controller, then try to read the Card's signature.
+ Return:
......@@ -65,14 +63,9 @@ act2000_isa_detect(unsigned short portbase)
static irqreturn_t
act2000_isa_interrupt(int irq, void *dev_id)
{
act2000_card *card = irq2card_map[irq];
act2000_card *card = dev_id;
u_char istatus;
if (!card) {
printk(KERN_WARNING
"act2000: Spurious interrupt!\n");
return IRQ_NONE;
}
istatus = (inb(ISA_PORT_ISR) & 0x07);
if (istatus & ISA_ISR_OUT) {
/* RX fifo has data */
......@@ -139,17 +132,15 @@ int
act2000_isa_config_irq(act2000_card * card, short irq)
{
if (card->flags & ACT2000_FLAGS_IVALID) {
free_irq(card->irq, NULL);
irq2card_map[card->irq] = NULL;
free_irq(card->irq, card);
}
card->flags &= ~ACT2000_FLAGS_IVALID;
outb(ISA_COR_IRQOFF, ISA_PORT_COR);
if (!irq)
return 0;
if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, NULL)) {
if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) {
card->irq = irq;
irq2card_map[card->irq] = card;
card->flags |= ACT2000_FLAGS_IVALID;
printk(KERN_WARNING
"act2000: Could not request irq %d\n",irq);
......@@ -188,10 +179,9 @@ act2000_isa_release(act2000_card * card)
unsigned long flags;
spin_lock_irqsave(&card->lock, flags);
if (card->flags & ACT2000_FLAGS_IVALID) {
free_irq(card->irq, NULL);
irq2card_map[card->irq] = NULL;
}
if (card->flags & ACT2000_FLAGS_IVALID)
free_irq(card->irq, card);
card->flags &= ~ACT2000_FLAGS_IVALID;
if (card->flags & ACT2000_FLAGS_PVALID)
release_region(card->port, ISA_REGION);
......
......@@ -1415,7 +1415,7 @@ zoran_irq (int irq,
struct zoran *zr;
unsigned long flags;
zr = (struct zoran *) dev_id;
zr = dev_id;
count = 0;
if (zr->testing) {
......
......@@ -912,16 +912,11 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
static irqreturn_t
el3_interrupt(int irq, void *dev_id)
{
struct net_device *dev = (struct net_device *)dev_id;
struct net_device *dev = dev_id;
struct el3_private *lp;
int ioaddr, status;
int i = max_interrupt_work;
if (dev == NULL) {
printk ("el3_interrupt(): irq %d for unknown device.\n", irq);
return IRQ_NONE;
}
lp = netdev_priv(dev);
spin_lock(&lp->lock);
......
......@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr)
static irqreturn_t
elmc_interrupt(int irq, void *dev_id)
{
struct net_device *dev = (struct net_device *) dev_id;
struct net_device *dev = dev_id;
unsigned short stat;
struct priv *p;
if (dev == NULL) {
printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq);
return IRQ_NONE;
} else if (!netif_running(dev)) {
if (!netif_running(dev)) {
/* The 3c523 has this habit of generating interrupts during the
reset. I'm not sure if the ni52 has this same problem, but it's
really annoying if we haven't finished initializing it. I was
......
......@@ -1324,11 +1324,6 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
int rx_event = 0;
int tx_event = 0;
if (dev == NULL) {
printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq);
return IRQ_NONE;
}
ioaddr = dev->base_addr;
lp = netdev_priv(dev);
......
......@@ -406,14 +406,8 @@ irqreturn_t ei_interrupt(int irq, void *dev_id)
int interrupts, nr_serviced = 0;
struct ei_device *ei_local;
if (dev == NULL)
{
printk ("net_interrupt(): irq %d for unknown device.\n", irq);
return IRQ_NONE;
}
e8390_base = dev->base_addr;
ei_local = (struct ei_device *) netdev_priv(dev);
ei_local = netdev_priv(dev);
/*
* Protect the irq test too.
......
......@@ -598,17 +598,13 @@ static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)
Handle the network interface interrupts. */
static irqreturn_t atp_interrupt(int irq, void *dev_instance)
{
struct net_device *dev = (struct net_device *)dev_instance;
struct net_device *dev = dev_instance;
struct net_local *lp;
long ioaddr;
static int num_tx_since_rx;
int boguscount = max_interrupt_work;
int handled = 0;
if (dev == NULL) {
printk(KERN_ERR "ATP_interrupt(): irq %d for unknown device.\n", irq);
return IRQ_NONE;
}
ioaddr = dev->base_addr;
lp = netdev_priv(dev);
......
......@@ -265,12 +265,6 @@ static irqreturn_t de600_interrupt(int irq, void *dev_id)
int retrig = 0;
int boguscount = 0;
/* This might just as well be deleted now, no crummy drivers present :-) */
if ((dev == NULL) || (DE600_IRQ != irq)) {
printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq);
return IRQ_NONE;
}
spin_lock(&de600_lock);
select_nic();
......
......@@ -696,7 +696,7 @@ out:
static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
{
struct net_device *dev = (struct net_device *) dev_id;
struct net_device *dev = dev_id;
printk("%s: DMA error\n", dev->name);
return IRQ_HANDLED;
......@@ -704,7 +704,7 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
static irqreturn_t lance_interrupt(const int irq, void *dev_id)
{
struct net_device *dev = (struct net_device *) dev_id;
struct net_device *dev = dev_id;
struct lance_private *lp = netdev_priv(dev);
volatile struct lance_regs *ll = lp->ll;
int csr0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment