From 5396585df9aef8022f26bf7b26a14d4279fd1d43 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 20 Apr 2003 20:20:39 -0700 Subject: [PATCH] [PATCH] irqs: video drivers Update video drivers to the new IRQ API. Almost none of them compile, so it was done on-spec. --- drivers/video/amifb.c | 5 +++-- drivers/video/atafb.c | 3 ++- drivers/video/console/fbcon.c | 12 ++++++++---- drivers/video/pvr2fb.c | 5 +++-- drivers/video/sa1100fb.c | 3 ++- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index b09a1b4716f0e..efcc855ee8c93 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c @@ -1143,7 +1143,7 @@ static void amifb_deinit(void); */ static int flash_cursor(void); -static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp); +static irqreturn_t amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp); static u_long chipalloc(u_long size); static void chipfree(void); @@ -2504,7 +2504,7 @@ static int flash_cursor(void) * VBlank Display Interrupt */ -static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp) { if (do_vmode_pan || do_vmode_full) ami_update_display(); @@ -2534,6 +2534,7 @@ static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp) ami_reinit_copper(); do_vmode_full = 0; } + return IRQ_HANDLED; } /* --------------------------- Hardware routines --------------------------- */ diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 1ef989cd66beb..c4b05079141b1 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -1522,7 +1522,7 @@ static void falcon_set_par( struct atafb_par *par ) } -static void falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp ) +static irqreturn_t falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp ) { struct falcon_hw *hw = &f_new_mode; @@ -1579,6 +1579,7 @@ static void falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp ) videl.xoffset = current_par.hw.falcon.xoffset; shifter_f030.off_next = current_par.hw.falcon.line_offset; } + return IRQ_HANDLED; } diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 905f2d3aa1b84..cdcef46a49a5a 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -138,7 +138,6 @@ static int fbcon_set_origin(struct vc_data *); #define DEFAULT_CURSOR_BLINK_RATE (20) static int vbl_cursor_cnt; -static int cursor_blink_rate; #define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1) @@ -185,7 +184,7 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s */ static int vbl_detected; -static void fb_vbl_detect(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t fb_vbl_detect(int irq, void *dummy, struct pt_regs *fp) { vbl_detected++; } @@ -202,7 +201,9 @@ static void fb_flashcursor(void *private) info->fbops->fb_cursor(info, &info->cursor); } -static void fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) +#if (defined(__arm__) && defined(IRQ_VSYNCPULSE)) || defined(CONFIG_ATARI) || defined(CONFIG_MAC) +static int cursor_blink_rate; +static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) { struct fb_info *info = dev_id; @@ -210,7 +211,9 @@ static void fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) schedule_work(&info->queue); vbl_cursor_cnt = cursor_blink_rate; } + return IRQ_HANDLED; } +#endif static void cursor_timer_handler(unsigned long dev_addr); @@ -527,8 +530,9 @@ static const char *fbcon_startup(void) struct fb_info *info; struct vc_data *vc; static int done = 0; - int irqres = 1; + int irqres; + irqres = 1; /* * If num_registered_fb is zero, this is a call for the dummy part. * The frame buffer devices weren't initialized yet. diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index 78781ac6aa321..00a4eab71603d 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c @@ -246,7 +246,7 @@ static int pvr2_update_par(void); static void pvr2_update_display(void); static void pvr2_init_display(void); static void pvr2_do_blank(void); -static void pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp); +static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp); static int pvr2_init_cable(void); static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val, int size); @@ -939,7 +939,7 @@ static void pvr2_do_blank(void) is_blanked = do_blank > 0 ? do_blank : 0; } -static void pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp) { if (do_vmode_pan || do_vmode_full) pvr2_update_display(); @@ -958,6 +958,7 @@ static void pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp) if (do_vmode_full) { do_vmode_full = 0; } + return IRQ_HANDLED; } /* diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 3a2df13bed59d..884d16686b7e3 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c @@ -1395,7 +1395,7 @@ static void sa1100fb_disable_controller(struct sa1100fb_info *fbi) /* * sa1100fb_handle_irq: Handle 'LCD DONE' interrupts. */ -static void sa1100fb_handle_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sa1100fb_handle_irq(int irq, void *dev_id, struct pt_regs *regs) { struct sa1100fb_info *fbi = dev_id; unsigned int lcsr = LCSR; @@ -1406,6 +1406,7 @@ static void sa1100fb_handle_irq(int irq, void *dev_id, struct pt_regs *regs) } LCSR = lcsr; + return IRQ_HANDLED; } /* -- 2.53.0