1) delete node in irqpool list when thread disconnect.
*v0.0x22.1:
1) gpio0_D is unavailable on rk3288 with current pinctrl driver.
+*v0.0x22.2:
+ 1) modify the condition of DRM iommu, which makes code more readable
+ by using of_parse_phandle to check whether the "iommus" phandle exists
+ in the isp device node.
*/
-#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x22, 1)
+#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x22, 2)
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"
#define CAMSYS_PLATFORM_MARVIN_NAME "Platform_MarvinDev"
int err = 0;
camsys_mrv_clk_t *mrv_clk = NULL;
struct resource register_res;
- struct iommu_domain *domain;
+ struct iommu_domain *domain = NULL;
struct iommu_group *group;
struct device_node *np;
mrv_clk->in_on = false;
mrv_clk->out_on = 0;
- np = of_find_node_by_name(NULL, "isp0_mmu");
- if (!np) {
+ np = of_parse_phandle(pdev->dev.of_node, "iommus", 0);
+ if (np) {
int index = 0;
/* iommu domain */
domain = iommu_domain_alloc(&platform_bus_type);
if (!IS_ERR_OR_NULL(camsys_dev->miscdev.this_device))
misc_deregister(&camsys_dev->miscdev);
err_put_cookie:
- iommu_put_dma_cookie(domain);
+ if (domain)
+ iommu_put_dma_cookie(domain);
err_free_domain:
- iommu_domain_free(domain);
+ if (domain)
+ iommu_domain_free(domain);
clk_failed:
if (mrv_clk != NULL) {
if (!IS_ERR_OR_NULL(mrv_clk->pd_isp))