[PATCH] backlight: do not power off backlight when unregistering
[powerpc.git] / drivers / video / pvr2fb.c
index 78dc59a..a93618b 100644 (file)
@@ -209,7 +209,7 @@ static int pvr2fb_set_par(struct fb_info *info);
 static void pvr2_update_display(struct fb_info *info);
 static void pvr2_init_display(struct fb_info *info);
 static void pvr2_do_blank(void);
-static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp);
+static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id);
 static int pvr2_init_cable(void);
 static int pvr2_get_param(const struct pvr2_params *p, const char *s,
                             int val, int size);
@@ -626,7 +626,7 @@ static void pvr2_do_blank(void)
        is_blanked = do_blank > 0 ? do_blank : 0;
 }
 
-static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp)
+static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id)
 {
        struct fb_info *info = dev_id;
 
@@ -905,6 +905,15 @@ static int __init pvr2fb_dc_init(void)
 
 static void pvr2fb_dc_exit(void)
 {
+       if (fb_info->screen_base) {
+               iounmap(fb_info->screen_base);
+               fb_info->screen_base = NULL;
+       }
+       if (currentpar->mmio_base) {
+               iounmap((void *)currentpar->mmio_base);
+               currentpar->mmio_base = 0;
+       }
+
        free_irq(HW_EVENT_VSYNC, 0);
 #ifdef CONFIG_SH_DMA
        free_dma(pvr2dma);
@@ -946,6 +955,15 @@ static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev,
 
 static void __devexit pvr2fb_pci_remove(struct pci_dev *pdev)
 {
+       if (fb_info->screen_base) {
+               iounmap(fb_info->screen_base);
+               fb_info->screen_base = NULL;
+       }
+       if (currentpar->mmio_base) {
+               iounmap((void *)currentpar->mmio_base);
+               currentpar->mmio_base = 0;
+       }
+
        pci_release_regions(pdev);
 }