Commit 421dfa0e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] irqs: various char drivers

Fix up a bunch of char drivers for the new IRQ API.
parent 43bb7692
......@@ -108,7 +108,7 @@ static ssize_t ac_read (struct file *, char *, size_t, loff_t *);
static ssize_t ac_write (struct file *, const char *, size_t, loff_t *);
static int ac_ioctl(struct inode *, struct file *, unsigned int,
unsigned long);
static void ac_interrupt(int, void *, struct pt_regs *);
static irqreturn_t ac_interrupt(int, void *, struct pt_regs *);
static struct file_operations ac_fops = {
.owner = THIS_MODULE,
......@@ -606,11 +606,12 @@ static ssize_t ac_read (struct file *filp, char *buf, size_t count, loff_t *ptr)
}
}
static void ac_interrupt(int vec, void *dev_instance, struct pt_regs *regs)
static irqreturn_t ac_interrupt(int vec, void *dev_instance, struct pt_regs *regs)
{
unsigned int i;
unsigned int FlagInt;
unsigned int LoopCount;
int handled = 0;
// printk("Applicom interrupt on IRQ %d occurred\n", vec);
......@@ -632,6 +633,7 @@ static void ac_interrupt(int vec, void *dev_instance, struct pt_regs *regs)
continue;
}
handled = 1;
FlagInt = 1;
writeb(0, apbs[i].RamIO + RAM_IT_TO_PC);
......@@ -675,6 +677,7 @@ static void ac_interrupt(int vec, void *dev_instance, struct pt_regs *regs)
else
LoopCount++;
} while(LoopCount < 2);
return IRQ_RETVAL(handled);
}
......
......@@ -36,7 +36,7 @@
#include "mga_drm.h"
#include "mga_drv.h"
void mga_dma_service( DRM_IRQ_ARGS )
irqreturn_t mga_dma_service( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_mga_private_t *dev_priv =
......@@ -51,7 +51,9 @@ void mga_dma_service( DRM_IRQ_ARGS )
atomic_inc(&dev->vbl_received);
DRM_WAKEUP(&dev->vbl_queue);
DRM(vbl_send_signals)( dev );
return IRQ_HANDLED;
}
return IRQ_NONE;
}
int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence)
......
......@@ -36,7 +36,7 @@
#include "r128_drm.h"
#include "r128_drv.h"
void r128_dma_service( DRM_IRQ_ARGS )
irqreturn_t r128_dma_service( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_r128_private_t *dev_priv =
......@@ -51,7 +51,9 @@ void r128_dma_service( DRM_IRQ_ARGS )
atomic_inc(&dev->vbl_received);
DRM_WAKEUP(&dev->vbl_queue);
DRM(vbl_send_signals)( dev );
return IRQ_HANDLED;
}
return IRQ_NONE;
}
int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence)
......
......@@ -1298,18 +1298,21 @@ static int fdc_config(void)
TRACE_EXIT 0;
}
static void ftape_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t ftape_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
void (*handler) (void) = *fdc.hook;
int handled = 0;
TRACE_FUN(ft_t_any);
*fdc.hook = NULL;
if (handler) {
handled = 1;
handler();
} else {
TRACE(ft_t_bug, "Unexpected ftape interrupt");
}
TRACE_EXIT;
return IRQ_RETVAL(handled);
}
int fdc_grab_irq_and_dma(void)
......
......@@ -96,13 +96,14 @@ static void EnableSRAM(THINKPAD_BD_DATA * pBDData)
}
static void UartInterrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t UartInterrupt(int irq, void *dev_id, struct pt_regs *regs)
{
PRINTK_3(TRACE_TP3780I,
"tp3780i::UartInterrupt entry irq %x dev_id %x\n", irq, (int) dev_id);
return IRQ_HANDLED;
}
static void DspInterrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t DspInterrupt(int irq, void *dev_id, struct pt_regs *regs)
{
pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings;
......@@ -150,6 +151,7 @@ static void DspInterrupt(int irq, void *dev_id, struct pt_regs *regs)
"tp3780i::DspInterrupt, return false from dsp3780i_GetIPCSource\n");
}
PRINTK_1(TRACE_TP3780I, "tp3780i::DspInterrupt exit\n");
return IRQ_HANDLED;
}
......
......@@ -305,7 +305,7 @@ static void sonypi_setbluetoothpower(u8 state) {
}
/* Interrupt handler: some event is available */
void sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
u8 v1, v2, event = 0;
int i, j;
......@@ -334,7 +334,7 @@ void sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
if (verbose)
printk(KERN_WARNING
"sonypi: unknown event port1=0x%02x,port2=0x%02x\n",v1,v2);
return;
return IRQ_NONE;
found:
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
......@@ -354,6 +354,7 @@ void sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
}
#endif /* CONFIG_INPUT || CONFIG_INPUT_MODULE */
sonypi_pushq(event);
return IRQ_HANDLED;
}
/* External camera command (exported to the motion eye v4l driver) */
......
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