static int __exit mx1_camera_remove(struct platform_device *pdev) { struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); struct mx1_camera_dev *pcdev = container_of(soc_host, struct mx1_camera_dev, soc_host); struct resource *res; imx_dma_free(pcdev->dma_chan); disable_fiq(pcdev->irq); mxc_set_irq_fiq(pcdev->irq, 0); release_fiq(&fh); clk_put(pcdev->clk); soc_camera_host_unregister(soc_host); iounmap(pcdev->base); res = pcdev->res; release_mem_region(res->start, resource_size(res)); kfree(pcdev); dev_info(&pdev->dev, "MX1 Camera driver unloaded\n"); return 0; }
static int __exit omap1_cam_remove(struct platform_device *pdev) { struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); struct omap1_cam_dev *pcdev = container_of(soc_host, struct omap1_cam_dev, soc_host); struct resource *res; free_irq(pcdev->irq, pcdev); omap_free_dma(pcdev->dma_ch); soc_camera_host_unregister(soc_host); iounmap(pcdev->base); res = pcdev->res; release_mem_region(res->start, resource_size(res)); clk_put(pcdev->clk); kfree(pcdev); dev_info(&pdev->dev, "OMAP1 Camera Interface driver unloaded\n"); return 0; }
static int __devexit mx3_camera_remove(struct platform_device *pdev) { struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); struct mx3_camera_dev *mx3_cam = container_of(soc_host, struct mx3_camera_dev, soc_host); clk_put(mx3_cam->clk); soc_camera_host_unregister(soc_host); iounmap(mx3_cam->base); /* * The channel has either not been allocated, * or should have been released */ if (WARN_ON(mx3_cam->idmac_channel[0])) dma_release_channel(&mx3_cam->idmac_channel[0]->dma_chan); vb2_dma_contig_cleanup_ctx(mx3_cam->alloc_ctx); vfree(mx3_cam); dmaengine_put(); dev_info(&pdev->dev, "i.MX3x Camera driver unloaded\n"); return 0; }
static int ak_camera_remove(struct platform_device *pdev) { struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); struct ak_camera_dev *pcdev = container_of(soc_host, struct ak_camera_dev, soc_host); struct resource *res; CAMDBG("entry %s\n", __func__); /* free irq */ free_irq(pcdev->irq, pcdev); /* free clk */ clk_put(pcdev->clk); clk_put(pcdev->cis_sclk); soc_camera_host_unregister(soc_host); iounmap(pcdev->base); res = pcdev->res; release_mem_region(res->start, resource_size(res)); /* * @deconstruct the isp object. */ isp_module_fini(&pcdev->isp); kfree(pcdev); dev_info(&pdev->dev, "AK Camera driver unloaded\n"); return 0; }
static int __devexit sh_mobile_ceu_remove(struct platform_device *pdev) { struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); struct sh_mobile_ceu_dev *pcdev = container_of(soc_host, struct sh_mobile_ceu_dev, ici); soc_camera_host_unregister(soc_host); pm_runtime_disable(&pdev->dev); free_irq(pcdev->irq, pcdev); if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) dma_release_declared_memory(&pdev->dev); iounmap(pcdev->base); kfree(pcdev); return 0; }