Commit 40220c1a authored by David Howells's avatar David Howells
Browse files

IRQ: Use the new typedef for interrupt handler function pointers



Use the new typedef for interrupt handler function pointers rather than
actually spelling out the full thing each time.  This was scripted with the
following small shell script:

#!/bin/sh
egrep -nHrl -e 'irqreturn_t[ 	]*[(][*]' $* |
while read i
do
    echo $i
    perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
done
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
parent 58ba81db
......@@ -212,7 +212,7 @@ static struct platform_device corgits_device = {
*/
static struct pxamci_platform_data corgi_mci_platform_data;
static int corgi_mci_init(struct device *dev, irqreturn_t (*corgi_detect_int)(int, void *), void *data)
static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, void *data)
{
int err;
......
......@@ -125,7 +125,7 @@ static struct pxafb_mach_info sharp_lm8v31 = {
.pxafb_lcd_power = &idp_lcd_power
};
static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *), void *data)
static int idp_mci_init(struct device *dev, irq_handler_t idp_detect_int, void *data)
{
/* setup GPIO for PXA25x MMC controller */
pxa_gpio_mode(GPIO6_MMCCLK_MD);
......
......@@ -378,7 +378,7 @@ static struct pxafb_mach_info sharp_lm8v31 = {
#define MMC_POLL_RATE msecs_to_jiffies(1000)
static void lubbock_mmc_poll(unsigned long);
static irqreturn_t (*mmc_detect_int)(int, void *);
static irq_handler_t mmc_detect_int;
static struct timer_list mmc_timer = {
.function = lubbock_mmc_poll,
......@@ -412,7 +412,7 @@ static irqreturn_t lubbock_detect_int(int irq, void *data)
}
static int lubbock_mci_init(struct device *dev,
irqreturn_t (*detect_int)(int, void *),
irq_handler_t detect_int,
void *data)
{
/* setup GPIO for PXA25x MMC controller */
......
......@@ -313,7 +313,7 @@ static struct pxafb_mach_info mainstone_pxafb_info = {
.pxafb_backlight_power = mainstone_backlight_power,
};
static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_int)(int, void *), void *data)
static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_int, void *data)
{
int err;
......
......@@ -197,7 +197,7 @@ static struct platform_device poodle_ts_device = {
*/
static struct pxamci_platform_data poodle_mci_platform_data;
static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(int, void *), void *data)
static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int, void *data)
{
int err;
......
......@@ -291,7 +291,7 @@ static struct platform_device spitzts_device = {
static struct pxamci_platform_data spitz_mci_platform_data;
static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(int, void *), void *data)
static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, void *data)
{
int err;
......
......@@ -174,7 +174,7 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
*/
static struct pxamci_platform_data tosa_mci_platform_data;
static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *), void *data)
static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data)
{
int err;
......
......@@ -270,7 +270,7 @@ void board_pcmcia_power(int power) {;}
#endif /* CONFIG_MACH_TRIZEPS4_CONXS */
EXPORT_SYMBOL(board_pcmcia_power);
static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *), void *data)
static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int, void *data)
{
int err;
/* setup GPIO for PXA27x MMC controller */
......
......@@ -714,7 +714,7 @@ startup(struct async_struct *info)
{
unsigned long flags;
int retval=0;
irqreturn_t (*handler)(int, void *);
irq_handler_t handler;
struct serial_state *state= info->state;
unsigned long page;
......
......@@ -83,7 +83,7 @@ static char amiga_model_name[13] = "Amiga ";
extern char m68k_debug_device[];
static void amiga_sched_init(irqreturn_t (*handler)(int, void *));
static void amiga_sched_init(irq_handler_t handler);
/* amiga specific irq functions */
extern void amiga_init_IRQ (void);
static void amiga_get_model(char *model);
......@@ -487,7 +487,7 @@ void __init config_amiga(void)
static unsigned short jiffy_ticks;
static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *))
static void __init amiga_sched_init(irq_handler_t timer_routine)
{
static struct resource sched_res = {
.name = "timer", .start = 0x00bfd400, .end = 0x00bfd5ff,
......
......@@ -25,7 +25,7 @@ u_long cpuctrl_physaddr;
u_long timer_physaddr;
u_long apollo_model;
extern void dn_sched_init(irqreturn_t (*handler)(int,void *));
extern void dn_sched_init(irq_handler_t handler);
extern void dn_init_IRQ(void);
extern unsigned long dn_gettimeoffset(void);
extern int dn_dummy_hwclk(int, struct rtc_time *);
......@@ -176,7 +176,7 @@ void config_apollo(void) {
irqreturn_t dn_timer_int(int irq, void *dev_id)
{
irqreturn_t (*timer_handler)(int, void *) = dev_id;
irq_handler_t timer_handler = dev_id;
volatile unsigned char x;
......@@ -188,7 +188,7 @@ irqreturn_t dn_timer_int(int irq, void *dev_id)
return IRQ_HANDLED;
}
void dn_sched_init(irqreturn_t (*timer_routine)(int, void *))
void dn_sched_init(irq_handler_t timer_routine)
{
/* program timer 1 */
*(volatile unsigned char *)(timer+3)=0x01;
......
......@@ -62,7 +62,7 @@ static void atari_heartbeat( int on );
#endif
/* atari specific timer functions (in time.c) */
extern void atari_sched_init(irqreturn_t (*)(int, void *));
extern void atari_sched_init(irq_handler_t );
extern unsigned long atari_gettimeoffset (void);
extern int atari_mste_hwclk (int, struct rtc_time *);
extern int atari_tt_hwclk (int, struct rtc_time *);
......
......@@ -44,7 +44,7 @@
static int stdma_locked; /* the semaphore */
/* int func to be called */
static irqreturn_t (*stdma_isr)(int, void *);
static irq_handler_t stdma_isr;
static void *stdma_isr_data; /* data passed to isr */
static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
......@@ -75,7 +75,7 @@ static irqreturn_t stdma_int (int irq, void *dummy);
*
*/
void stdma_lock(irqreturn_t (*handler)(int, void *), void *data)
void stdma_lock(irq_handler_t handler, void *data)
{
unsigned long flags;
......
......@@ -20,7 +20,7 @@
#include <asm/atariints.h>
void __init
atari_sched_init(irqreturn_t (*timer_routine)(int, void *))
atari_sched_init(irq_handler_t timer_routine)
{
/* set Timer C data Register */
mfp.tim_dt_c = INT_TICKS;
......
......@@ -38,7 +38,7 @@
static void bvme6000_get_model(char *model);
static int bvme6000_get_hardware_list(char *buffer);
extern void bvme6000_sched_init(irqreturn_t (*handler)(int, void *));
extern void bvme6000_sched_init(irq_handler_t handler);
extern unsigned long bvme6000_gettimeoffset (void);
extern int bvme6000_hwclk (int, struct rtc_time *);
extern int bvme6000_set_clock_mmss (unsigned long);
......@@ -52,7 +52,7 @@ static unsigned char bin2bcd (unsigned char b);
/* Save tick handler routine pointer, will point to do_timer() in
* kernel/sched.c, called via bvme6000_process_int() */
static irqreturn_t (*tick_handler)(int, void *);
static irq_handler_t tick_handler;
int bvme6000_parse_bootinfo(const struct bi_record *bi)
......@@ -190,7 +190,7 @@ static irqreturn_t bvme6000_timer_int (int irq, void *dev_id)
* so divide by 8 to get the microsecond result.
*/
void bvme6000_sched_init (irqreturn_t (*timer_routine)(int, void *))
void bvme6000_sched_init (irq_handler_t timer_routine)
{
volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
unsigned char msr = rtc->msr & 0xc0;
......
......@@ -39,7 +39,7 @@
static irqreturn_t hp300_tick(int irq, void *dev_id)
{
unsigned long tmp;
irqreturn_t (*vector)(int, void *) = dev_id;
irq_handler_t vector = dev_id;
in_8(CLOCKBASE + CLKSR);
asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE));
/* Turn off the network and SCSI leds */
......@@ -63,7 +63,7 @@ unsigned long hp300_gettimeoffset(void)
return (USECS_PER_JIFFY * ticks) / INTVAL;
}
void __init hp300_sched_init(irqreturn_t (*vector)(int, void *))
void __init hp300_sched_init(irq_handler_t vector)
{
out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */
out_8(CLOCKBASE + CLKCR1, 0x1); /* reset */
......
extern void hp300_sched_init(irqreturn_t (*vector)(int, void *));
extern void hp300_sched_init(irq_handler_t vector);
extern unsigned long hp300_gettimeoffset (void);
......@@ -216,7 +216,7 @@ int setup_irq(unsigned int irq, struct irq_node *node)
}
int request_irq(unsigned int irq,
irqreturn_t (*handler) (int, void *),
irq_handler_t handler,
unsigned long flags, const char *devname, void *dev_id)
{
struct irq_node *node;
......
......@@ -64,7 +64,7 @@ static char m68k_command_line[CL_SIZE];
char m68k_debug_device[6] = "";
void (*mach_sched_init) (irqreturn_t (*handler)(int, void *)) __initdata = NULL;
void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
/* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL;
void (*mach_get_model) (char *model);
......
......@@ -72,7 +72,7 @@ extern int show_mac_interrupts(struct seq_file *, void *);
extern void iop_preinit(void);
extern void iop_init(void);
extern void via_init(void);
extern void via_init_clock(irqreturn_t (*func)(int, void *));
extern void via_init_clock(irq_handler_t func);
extern void via_flush_cache(void);
extern void oss_init(void);
extern void psc_init(void);
......@@ -88,7 +88,7 @@ extern void mac_debugging_long(int, long);
static void mac_get_model(char *str);
static void mac_sched_init(irqreturn_t (*vector)(int, void *))
static void mac_sched_init(irq_handler_t vector)
{
via_init_clock(vector);
}
......
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