X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fpvr2fb.c;h=df2909ae704cd51132021b14a85d066f71b5517b;hb=f4ebc993759dc25dc3db6b6f1a13a23df8264d4b;hp=c7bc80921f1613196deeca432f015451184b4c87;hpb=24fcbacedb0d83cabc6761acbecfbf751265ce52;p=linux-2.6 diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index c7bc80921f..df2909ae70 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c @@ -214,7 +214,7 @@ static int pvr2_init_cable(void); static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val, int size); #ifdef CONFIG_SH_DMA -static ssize_t pvr2fb_write(struct file *file, const char *buf, +static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, size_t count, loff_t *ppos); #endif @@ -674,7 +674,7 @@ static int pvr2_init_cable(void) } #ifdef CONFIG_SH_DMA -static ssize_t pvr2fb_write(struct file *file, const char *buf, +static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, size_t count, loff_t *ppos) { unsigned long dst, start, end, len; @@ -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); }