static void __devexit chipsfb_remove(struct pci_dev *dp) { struct fb_info *p = pci_get_drvdata(dp); if (p != &chipsfb_info || p->screen_base == NULL) return; unregister_framebuffer(p); iounmap(p->screen_base); p->screen_base = NULL; release_mem_region(pci_resource_start(dp, 0), pci_resource_len(dp, 0)); #ifdef CONFIG_PMAC_PBOOK pmu_unregister_sleep_notifier(&chips_sleep_notifier); #endif /* CONFIG_PMAC_PBOOK */ }
static int __devexit bw2_remove(struct of_device *dev) { struct all_info *all = dev_get_drvdata(&dev->dev); unregister_framebuffer(&all->info); of_iounmap(all->par.regs, sizeof(struct bw2_regs)); of_iounmap(all->info.screen_base, all->par.fbsize); kfree(all); dev_set_drvdata(&dev->dev, NULL); return 0; }
static void fb_free_resources(struct sprdfb_device *dev) { if (dev == NULL) return; if (&dev->fb->cmap != NULL) { fb_dealloc_cmap(&dev->fb->cmap); } if (dev->fb->screen_base) { free_pages((unsigned long)dev->fb->screen_base, get_order(dev->fb->fix.smem_len)); } unregister_framebuffer(dev->fb); framebuffer_release(dev->fb); }
static int verify_fbinfo(struct fb_info* fbi) { int ret=0; struct msm_fb_data_type* mfd = fbi->par; if (mfd->panel_info.type != EBI2_PANEL && mfd->panel_info.type != MDDI_PANEL) return EINVAL; ret = register_framebuffer (fbi); unregister_framebuffer (fbi); if (ret < 0) { printk("DPSV: Error: Failed to register Framebuffer: %d\n", ret); } return ret; };
static int wm8505fb_remove(struct platform_device *pdev) { struct wm8505fb_info *fbi = platform_get_drvdata(pdev); device_remove_file(&pdev->dev, &dev_attr_contrast); unregister_framebuffer(&fbi->fb); writel(0, fbi->regbase); if (fbi->fb.cmap.len) fb_dealloc_cmap(&fbi->fb.cmap); return 0; }
static int __devexit tcx_remove(struct of_device *dev) { struct all_info *all = dev_get_drvdata(&dev->dev); unregister_framebuffer(&all->info); fb_dealloc_cmap(&all->info.cmap); tcx_unmap_regs(all); kfree(all); dev_set_drvdata(&dev->dev, NULL); return 0; }
static int __devexit st7735fb_remove(struct spi_device *spi) { struct fb_info *info = spi_get_drvdata(spi); spi_set_drvdata(spi, NULL); if (info) { unregister_framebuffer(info); vfree(info->screen_base); framebuffer_release(info); } /* TODO: release gpios */ return 0; }
static int ncfb_remove(struct platform_device *pdev) { struct fb_info *info = NULL; info = platform_get_drvdata(pdev); if (!info) return -EINVAL; unregister_framebuffer(info); framebuffer_release(info); platform_set_drvdata(pdev,NULL); return 0; }
static int vdmafb_remove(struct platform_device *pdev) { struct vdmafb_dev *fbdev = platform_get_drvdata(pdev); if (fbdev->backlight) backlight_device_unregister(fbdev->backlight); unregister_framebuffer(&fbdev->info); /* Disable display */ vdmafb_writereg(fbdev, VDMAFB_BACKLIGHT_CONTROL, 0); vdmafb_writereg(fbdev, VDMAFB_CONTROL, 0); dma_release_channel(fbdev->dma); dma_free_coherent(&pdev->dev, PAGE_ALIGN(fbdev->info.fix.smem_len), fbdev->fb_virt, fbdev->fb_phys); fb_dealloc_cmap(&fbdev->info.cmap); return 0; }
static int __devexit st7585_remove(struct spi_device *spi) { struct st7585_data *drvdata = spi_get_drvdata(spi); spin_lock_irq(&drvdata->lock); drvdata->spi = NULL; spi_set_drvdata(spi, NULL); if (drvdata->info) { unregister_framebuffer(drvdata->info); fb_deferred_io_cleanup(drvdata->info); framebuffer_release(drvdata->info); } spin_unlock_irq(&drvdata->lock); return 0; }
static int qtft_fb_remove(struct platform_device *dev) { struct fb_info *info = platform_get_drvdata(dev); func_in(); if (info) { lcd_exit(); unregister_framebuffer(info); fb_dealloc_cmap(&info->cmap); framebuffer_release(info); rvfree(videomemory, videomemorysize); } func_out(); return 0; }
static int hecubafb_remove(struct platform_device *dev) { struct fb_info *info = platform_get_drvdata(dev); if (info) { struct hecubafb_par *par = info->par; fb_deferred_io_cleanup(info); unregister_framebuffer(info); vfree((void __force *)info->screen_base); if (par->board->remove) par->board->remove(par); module_put(par->board->owner); framebuffer_release(info); } return 0; }
static int __devexit bw2_remove(struct of_device *op) { struct fb_info *info = dev_get_drvdata(&op->dev); struct bw2_par *par = info->par; unregister_framebuffer(info); of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs)); of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len); framebuffer_release(info); dev_set_drvdata(&op->dev, NULL); return 0; }
static int __devexit leo_remove(struct of_device *op) { struct fb_info *info = dev_get_drvdata(&op->dev); struct leo_par *par = info->par; unregister_framebuffer(info); fb_dealloc_cmap(&info->cmap); leo_unmap_regs(op, info, par); framebuffer_release(info); dev_set_drvdata(&op->dev, NULL); return 0; }
static void mxcfb_exit(void) { struct fb_info *fbi = dev_get_drvdata(&mxcfb_device.dev); if (fbi) { mxcfb_unmap_video_memory(fbi); if (&fbi->cmap) fb_dealloc_cmap(&fbi->cmap); unregister_framebuffer(fbi); framebuffer_release(fbi); } platform_device_unregister(&mxcfb_device); platform_driver_unregister(&mxcfb_driver); }
/* * stmfb_destroyfb * Unregister a framebuffer, clear it off the display and release * its resources. */ static int __exit stmfb_destroyfb(struct stmfb_info *i) { DPRINTK("\n"); stmfb_cleanup_class_device(i); unregister_framebuffer(&i->info); if(i->pFBPlane && i->pFBMainOutput) { stm_display_plane_unlock(i->pFBPlane); stm_display_plane_disconnect_from_output(i->pFBPlane, i->pFBMainOutput); stm_display_output_stop(i->pFBMainOutput); if(i->hdmi) { /* * Force the HDMI manager state as we do on a mode change to force a * hotplug event if the display is started again, i.e. the framebuffer * module gets reloaded. */ i->hdmi->status_changed = 0; i->hdmi->status = STM_DISPLAY_DISCONNECTED; } stm_display_plane_release(i->pFBPlane); i->pFBPlane = NULL; } if(i->ulPFBBase) { iounmap(i->info.screen_base); i->info.screen_base = NULL; bpa2_free_pages (i->FBPart, i->ulPFBBase); i->ulPFBBase = 0; i->FBPart = NULL; } fb_dealloc_cmap (&i->info.cmap); stmfb_destroy_auxmem (i); return 0; }
__s32 Fb_Exit(void) { __u8 fb_id=0; for(fb_id=0; fb_id<FB_MAX; fb_id++) { if(g_fbi.fbinfo[fb_id] != NULL) { Display_Fb_Release(FBIDTOHAND(fb_id)); } } for(fb_id=0; fb_id<8; fb_id++) { unregister_framebuffer(g_fbi.fbinfo[fb_id]); framebuffer_release(g_fbi.fbinfo[fb_id]); g_fbi.fbinfo[fb_id] = NULL; } return 0; }
static bool_t sandbox_unregister_framebuffer(struct resource_t * res) { struct fb_t * fb; char name[64]; snprintf(name, sizeof(name), "%s.%d", res->name, res->id); fb = search_framebuffer(name); if(!fb) return FALSE; if(!unregister_framebuffer(fb)) return FALSE; free(fb->name); free(fb); return TRUE; }
static void intel_fbdev_destroy(struct drm_device *dev, struct intel_fbdev *ifbdev) { if (ifbdev->helper.fbdev) { struct fb_info *info = ifbdev->helper.fbdev; unregister_framebuffer(info); iounmap(info->screen_base); if (info->cmap.len) fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } drm_fb_helper_fini(&ifbdev->helper); drm_framebuffer_unregister_private(&ifbdev->ifb.base); intel_framebuffer_fini(&ifbdev->ifb); }
static int __devexit milkymistfb_remove(struct platform_device *pdev) { struct milkymistfb *milkymistfb = platform_get_drvdata(pdev); struct fb_info *info = milkymistfb->fb; iowrite32be(VGA_RESET, CSR_VGA_RESET); unregister_framebuffer(info); framebuffer_release(info); /* dma_free_coherent(&pdev->dev, videomemorysize, milkymistfb->vidmem, milkymistfb->vidmem_phys);*/ vfree(milkymistfb->vidmem); fb_dealloc_cmap(&info->cmap); platform_set_drvdata(pdev, NULL); return 0; }
static void evdi_fbdev_destroy(__always_unused struct drm_device *dev, struct evdi_fbdev *ufbdev) { struct fb_info *info; if (ufbdev->helper.fbdev) { info = ufbdev->helper.fbdev; unregister_framebuffer(info); if (info->cmap.len) fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } drm_fb_helper_fini(&ufbdev->helper); drm_framebuffer_unregister_private(&ufbdev->ufb.base); drm_framebuffer_cleanup(&ufbdev->ufb.base); drm_gem_object_unreference_unlocked(&ufbdev->ufb.obj->base); }
void cleanup_module(void) { int status = 0; if (bModInit) { status = unregister_framebuffer(&fb_info.gen.info); if (status < 0) { printk ("Failed to unregister the framebuffer device (status=%d).\n", status); } else { ruby_deinit_display(); free_framebuffer(); if (periodic_flush_enable) del_timer(&fb_info.ruby_timer); bModInit = 0; } } }
/* * Cleanup */ void exit_zion_vga(void) { zion_params_t *params = find_zion(0); //Check Fireball if((params->revision & 0xF000) == 0xF000){ return; } /* * If your driver supports multiple boards, you should unregister and * clean up all instances. */ unregister_framebuffer(&zion_fb_info.fb_info); free_pages(zion_fb_info.ram_address, ZIONVGA_VRAM_ORDER); fb_dealloc_cmap(&zion_fb_info.fb_info.cmap); PINFO("ZION VGA cleanup\n"); }
static int __devexit st7586fb_remove(struct spi_device *spi) { struct fb_info *info = spi_get_drvdata(spi); spi_set_drvdata(spi, NULL); if (info) { struct st7586fb_par *par = info->par; unregister_framebuffer(info); cancel_delayed_work_sync(&par->dwork); kfree(info->screen_base); kfree(par->buf); gpio_free(par->rst); gpio_free(par->a0); if (par->cs) gpio_free(par->cs); framebuffer_release(info); } return 0; }
static int nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *nfbdev) { struct nouveau_framebuffer *nouveau_fb = &nfbdev->nouveau_fb; struct fb_info *info; if (nfbdev->helper.fbdev) { info = nfbdev->helper.fbdev; unregister_framebuffer(info); if (info->cmap.len) fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } if (nouveau_fb->nvbo) { drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->gem); nouveau_fb->nvbo = NULL; } drm_fb_helper_fini(&nfbdev->helper); drm_framebuffer_cleanup(&nouveau_fb->base); return 0; }
static int imxfb_remove(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = dev_get_drvdata(dev); struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* disable LCD controller */ CRM_PCCR0 &= ~(PCCR0_HCLK_LCDC_EN | PCCR0_PERCLK3_EN); unregister_framebuffer(info); fb_dealloc_cmap(&info->cmap); kfree(info->pseudo_palette); framebuffer_release(info); release_mem_region(res->start, res->end - res->start + 1); dev_set_drvdata(dev, NULL); return 0; }
static int osd_remove(struct platform_device *pdev) { struct fb_info *fbi; int i=0; amlog_level(LOG_LEVEL_HIGH,"osd_remove.\n"); if (!pdev) return -ENODEV; #ifdef CONFIG_HAS_EARLYSUSPEND unregister_early_suspend(&early_suspend); #endif vout_unregister_client(&osd_notifier_nb); for(i=0;i<OSD_COUNT;i++) { int j; if(gp_fbdev_list[i]) { myfb_dev_t * fbdev=gp_fbdev_list[i]; fbi = fbdev->fb_info; for(j=0;j<ARRAY_SIZE(osd_attrs);j++) device_remove_file(fbi->dev, &osd_attrs[j]); iounmap(fbdev->fb_mem_vaddr); kfree(fbi->pseudo_palette); fb_dealloc_cmap(&fbi->cmap); unregister_framebuffer(fbi); framebuffer_release(fbi); } } return 0; }
static int __devexit wm8505fb_remove(struct platform_device *pdev) { struct wm8505fb_info *fbi = platform_get_drvdata(pdev); struct resource *res; device_remove_file(&pdev->dev, &dev_attr_contrast); unregister_framebuffer(&fbi->fb); writel(0, fbi->regbase); if (fbi->fb.cmap.len) fb_dealloc_cmap(&fbi->fb.cmap); iounmap(fbi->regbase); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(res->start, resource_size(res)); kfree(fbi); return 0; }
static void fb_f1c500s_remove(struct device_t * dev) { struct framebuffer_t * fb = (struct framebuffer_t *)dev->priv; struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv; if(fb && unregister_framebuffer(fb)) { clk_disable(pdat->clkdefe); clk_disable(pdat->clkdebe); clk_disable(pdat->clktcon); free(pdat->clkdefe); free(pdat->clkdebe); free(pdat->clktcon); dma_free_noncoherent(pdat->vram[0]); dma_free_noncoherent(pdat->vram[1]); region_list_free(pdat->nrl); region_list_free(pdat->orl); free_device_name(fb->name); free(fb->priv); free(fb); } }
static void intel_fbdev_destroy(struct drm_device *dev, struct intel_fbdev *ifbdev) { struct fb_info *info; struct intel_framebuffer *ifb = &ifbdev->ifb; if (ifbdev->helper.fbdev) { info = ifbdev->helper.fbdev; unregister_framebuffer(info); iounmap(info->screen_base); if (info->cmap.len) fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } drm_fb_helper_fini(&ifbdev->helper); drm_framebuffer_cleanup(&ifb->base); if (ifb->obj) { drm_gem_object_unreference_unlocked(&ifb->obj->base); ifb->obj = NULL; } }