Commit 437ce181 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] irqs: drivers/block

Mop up various block and cdrom drivers.  Also fix a bunch of warnings and
compilation failures.
parent a688bf88
......@@ -761,7 +761,7 @@ static void do_pcd_request(request_queue_t * q)
static inline void next_request(int success)
{
long saved_flags;
unsigned long saved_flags;
spin_lock_irqsave(&pcd_lock, saved_flags);
end_request(pcd_req, success);
......
......@@ -757,7 +757,7 @@ static void do_pd_request(request_queue_t * q)
static int pd_next_buf(void)
{
long saved_flags;
unsigned long saved_flags;
pd_count--;
pd_run--;
......@@ -777,7 +777,7 @@ static int pd_next_buf(void)
static inline void next_request(int success)
{
long saved_flags;
unsigned long saved_flags;
spin_lock_irqsave(&pd_lock, saved_flags);
end_request(pd_req, success);
......
......@@ -812,7 +812,7 @@ static void do_pf_request(request_queue_t * q)
static int pf_next_buf(void)
{
long saved_flags;
unsigned long saved_flags;
pf_count--;
pf_run--;
......@@ -832,7 +832,8 @@ static int pf_next_buf(void)
static inline void next_request(int success)
{
long saved_flags;
unsigned long saved_flags;
spin_lock_irqsave(&pf_spin_lock, saved_flags);
end_request(pf_req, success);
pf_busy = 0;
......
......@@ -77,7 +77,7 @@ static int ps2esdi_out_cmd_blk(u_short * cmd_blk);
static void ps2esdi_prep_dma(char *buffer, u_short length, u_char dma_xmode);
static void ps2esdi_interrupt_handler(int irq, void *dev_id,
static irqreturn_t ps2esdi_interrupt_handler(int irq, void *dev_id,
struct pt_regs *regs);
static void (*current_int_handler) (u_int) = NULL;
static void ps2esdi_normal_interrupt_handler(u_int);
......@@ -681,7 +681,7 @@ static void ps2esdi_prep_dma(char *buffer, u_short length, u_char dma_xmode)
static void ps2esdi_interrupt_handler(int irq, void *dev_id,
static irqreturn_t ps2esdi_interrupt_handler(int irq, void *dev_id,
struct pt_regs *regs)
{
u_int int_ret_code;
......@@ -695,8 +695,9 @@ static void ps2esdi_interrupt_handler(int irq, void *dev_id,
} else
printk("%s: help ! No interrupt handler.\n", DEVICE_NAME);
} else {
return;
return IRQ_NONE;
}
return IRQ_HANDLED;
}
static void ps2esdi_initial_reset_int_handler(u_int int_ret_code)
......
......@@ -446,17 +446,20 @@ static void xd_recalibrate (u_char drive)
}
/* xd_interrupt_handler: interrupt service routine */
static void xd_interrupt_handler(int irq, void *dev_id, struct pt_regs * regs)
static irqreturn_t xd_interrupt_handler(int irq, void *dev_id,
struct pt_regs *regs)
{
if (inb(XD_STATUS) & STAT_INTERRUPT) { /* check if it was our device */
#ifdef DEBUG_OTHER
printk("xd_interrupt_handler: interrupt detected\n");
#endif /* DEBUG_OTHER */
outb(0,XD_CONTROL); /* acknowledge interrupt */
wake_up(&xd_wait_int); /* and wake up sleeping processes */
wake_up(&xd_wait_int); /* and wake up sleeping processes */
return IRQ_HANDLED;
}
else
printk("xd: unexpected interrupt\n");
return IRQ_NONE;
}
/* xd_setup_dma: set up the DMA controller for a data transfer */
......
......@@ -13,6 +13,8 @@
* Also thanks to: Salvador Abreu, Dave Thaler, Risto Kankkunen and Wim Van Dorst.
*/
#include <linux/interrupt.h>
/* XT hard disk controller registers */
#define XD_DATA (xd_iobase + 0x00) /* data RW register */
#define XD_RESET (xd_iobase + 0x01) /* reset WO register */
......@@ -107,7 +109,8 @@ static int xd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsi
static int xd_readwrite (u_char operation,XD_INFO *disk,char *buffer,u_int block,u_int count);
static void xd_recalibrate (u_char drive);
static void xd_interrupt_handler (int irq, void *dev_id, struct pt_regs *regs);
static irqreturn_t xd_interrupt_handler(int irq, void *dev_id,
struct pt_regs *regs);
static u_char xd_setup_dma (u_char opcode,u_char *buffer,u_int count);
static u_char *xd_build (u_char *cmdblk,u_char command,u_char drive,u_char head,u_short cylinder,u_char sector,u_char count,u_char control);
static void xd_watchdog (unsigned long unused);
......
......@@ -451,7 +451,7 @@ static inline void reset_drive(void)
*/
static int scd_reset(struct cdrom_device_info *cdi)
{
int retry_count;
unsigned long retry_count;
reset_drive();
......@@ -511,7 +511,7 @@ static inline void write_cmd(unsigned char cmd)
outb(cmd, sony_cd_cmd_reg);
}
static void cdu31a_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t cdu31a_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned char val;
......@@ -545,6 +545,7 @@ static void cdu31a_interrupt(int irq, void *dev_id, struct pt_regs *regs)
printk
("CDU31A: Got an interrupt but nothing was waiting\n");
}
return IRQ_HANDLED;
}
/*
......@@ -712,7 +713,7 @@ static void restart_on_error(void)
{
unsigned char res_reg[12];
unsigned int res_size;
unsigned int retry_count;
unsigned long retry_count;
printk("cdu31a: Resetting drive on error\n");
......@@ -772,7 +773,7 @@ get_result(unsigned char *result_buffer, unsigned int *result_size)
{
unsigned char a, b;
int i;
unsigned int retry_count;
unsigned long retry_count;
while (handle_sony_cd_attention());
......@@ -900,7 +901,7 @@ do_sony_cd_cmd(unsigned char cmd,
unsigned int num_params,
unsigned char *result_buffer, unsigned int *result_size)
{
unsigned int retry_count;
unsigned long retry_count;
int num_retries;
int recursive_call;
unsigned long flags;
......@@ -1148,7 +1149,7 @@ start_request(unsigned int sector, unsigned int nsect, int read_nsect_only)
{
unsigned char params[6];
unsigned int read_size;
unsigned int retry_count;
unsigned long retry_count;
#if DEBUG
......@@ -1339,7 +1340,7 @@ read_data_block(char *buffer,
unsigned int nblocks,
unsigned char res_reg[], int *res_size)
{
unsigned int retry_count;
unsigned long retry_count;
unsigned int bytesleft;
unsigned int offset;
unsigned int skip;
......@@ -2372,7 +2373,7 @@ static int sony_get_subchnl_info(struct cdrom_subchnl *schi)
static void
read_audio_data(char *buffer, unsigned char res_reg[], int *res_size)
{
unsigned int retry_count;
unsigned long retry_count;
int result_read;
......@@ -3206,7 +3207,7 @@ static void __init
get_drive_configuration(unsigned short base_io,
unsigned char res_reg[], unsigned int *res_size)
{
int retry_count;
unsigned long retry_count;
/* Set the base address */
......
......@@ -360,8 +360,7 @@ static struct tasklet_struct cm206_tasklet;
as there seems so reason for this to happen.
*/
static void cm206_interrupt(int sig, void *dev_id, struct pt_regs *regs)
/* you rang? */
static irqreturn_t cm206_interrupt(int sig, void *dev_id, struct pt_regs *regs)
{
volatile ush fool;
cd->intr_ds = inw(r_data_status); /* resets data_ready, data_error,
......@@ -436,6 +435,7 @@ static void cm206_interrupt(int sig, void *dev_id, struct pt_regs *regs)
|| cd->fifo_overflowed))
tasklet_schedule(&cm206_tasklet); /* issue a stop read command */
stats(interrupt);
return IRQ_HANDLED;
}
/* we have put the address of the wait queue in who */
......
......@@ -623,7 +623,7 @@ static void mcd_transfer(void)
* Just take the interrupt and clear out the status reg.
*/
static void mcd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t mcd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
int st;
......@@ -635,6 +635,7 @@ static void mcd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if ((st & 0xFF) != 0xFF)
mcd_error = st ? st & 0xFF : -1;
}
return IRQ_HANDLED;
}
......
......@@ -260,9 +260,6 @@ static struct block_device_operations mcdx_bdops =
addresses, such as mcdx_open and mcdx_close in the
structure mcdx_dops. */
/* ??? exported by the mcdx_sigaction struct */
static void mcdx_intr(int, void *, struct pt_regs *);
/* exported by file_ops */
static int mcdx_open(struct cdrom_device_info *cdi, int purpose);
static void mcdx_close(struct cdrom_device_info *cdi);
......@@ -854,7 +851,7 @@ static void mcdx_delay(struct s_drive_stuff *stuff, long jifs)
}
}
static void mcdx_intr(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t mcdx_intr(int irq, void *dev_id, struct pt_regs *regs)
{
struct s_drive_stuff *stuffp;
unsigned char b;
......@@ -863,7 +860,7 @@ static void mcdx_intr(int irq, void *dev_id, struct pt_regs *regs)
if (stuffp == NULL) {
xwarn("mcdx: no device for intr %d\n", irq);
return;
return IRQ_NONE;
}
#ifdef AK2
if (!stuffp->busy && stuffp->pending)
......@@ -895,6 +892,7 @@ static void mcdx_intr(int irq, void *dev_id, struct pt_regs *regs)
stuffp->busy = 0;
wake_up_interruptible(&stuffp->busyq);
return IRQ_HANDLED;
}
......
......@@ -317,15 +317,17 @@ disable_interrupts(void)
#endif
}
static void
static irqreturn_t
cdu535_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
disable_interrupts();
if (waitqueue_active(&cdu535_irq_wait))
if (waitqueue_active(&cdu535_irq_wait)) {
wake_up(&cdu535_irq_wait);
else
printk(CDU535_MESSAGE_NAME
": Got an interrupt but nothing was waiting\n");
return IRQ_HANDLED;
}
printk(CDU535_MESSAGE_NAME
": Got an interrupt but nothing was waiting\n");
return IRQ_NONE;
}
......
......@@ -1311,7 +1311,6 @@ static irqreturn_t ftape_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} else {
TRACE(ft_t_bug, "Unexpected ftape interrupt");
}
TRACE_EXIT;
return IRQ_RETVAL(handled);
}
......
......@@ -113,7 +113,7 @@ static void promise_selectproc (ide_drive_t *drive)
*/
int pdc4030_cmd(ide_drive_t *drive, u8 cmd)
{
u32 timeout;
unsigned long timeout;
u8 status_val;
promise_selectproc(drive); /* redundant? */
......
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