mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 10:44:23 +08:00
Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes
arm hdlcd fix. * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm: ARM HDLCD - fix an error code drm: ARM HDLCD - get rid of devm_clk_put()
This commit is contained in:
commit
4cf43e0ed4
@ -57,14 +57,13 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
|
|||||||
DRM_ERROR("failed to map control registers area\n");
|
DRM_ERROR("failed to map control registers area\n");
|
||||||
ret = PTR_ERR(hdlcd->mmio);
|
ret = PTR_ERR(hdlcd->mmio);
|
||||||
hdlcd->mmio = NULL;
|
hdlcd->mmio = NULL;
|
||||||
goto fail;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
version = hdlcd_read(hdlcd, HDLCD_REG_VERSION);
|
version = hdlcd_read(hdlcd, HDLCD_REG_VERSION);
|
||||||
if ((version & HDLCD_PRODUCT_MASK) != HDLCD_PRODUCT_ID) {
|
if ((version & HDLCD_PRODUCT_MASK) != HDLCD_PRODUCT_ID) {
|
||||||
DRM_ERROR("unknown product id: 0x%x\n", version);
|
DRM_ERROR("unknown product id: 0x%x\n", version);
|
||||||
ret = -EINVAL;
|
return -EINVAL;
|
||||||
goto fail;
|
|
||||||
}
|
}
|
||||||
DRM_INFO("found ARM HDLCD version r%dp%d\n",
|
DRM_INFO("found ARM HDLCD version r%dp%d\n",
|
||||||
(version & HDLCD_VERSION_MAJOR_MASK) >> 8,
|
(version & HDLCD_VERSION_MAJOR_MASK) >> 8,
|
||||||
@ -73,7 +72,7 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
|
|||||||
/* Get the optional framebuffer memory resource */
|
/* Get the optional framebuffer memory resource */
|
||||||
ret = of_reserved_mem_device_init(drm->dev);
|
ret = of_reserved_mem_device_init(drm->dev);
|
||||||
if (ret && ret != -ENODEV)
|
if (ret && ret != -ENODEV)
|
||||||
goto fail;
|
return ret;
|
||||||
|
|
||||||
ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32));
|
ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32));
|
||||||
if (ret)
|
if (ret)
|
||||||
@ -101,8 +100,6 @@ irq_fail:
|
|||||||
drm_crtc_cleanup(&hdlcd->crtc);
|
drm_crtc_cleanup(&hdlcd->crtc);
|
||||||
setup_fail:
|
setup_fail:
|
||||||
of_reserved_mem_device_release(drm->dev);
|
of_reserved_mem_device_release(drm->dev);
|
||||||
fail:
|
|
||||||
devm_clk_put(drm->dev, hdlcd->clk);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -412,7 +409,6 @@ err_unload:
|
|||||||
pm_runtime_put_sync(drm->dev);
|
pm_runtime_put_sync(drm->dev);
|
||||||
pm_runtime_disable(drm->dev);
|
pm_runtime_disable(drm->dev);
|
||||||
of_reserved_mem_device_release(drm->dev);
|
of_reserved_mem_device_release(drm->dev);
|
||||||
devm_clk_put(dev, hdlcd->clk);
|
|
||||||
err_free:
|
err_free:
|
||||||
drm_dev_unref(drm);
|
drm_dev_unref(drm);
|
||||||
|
|
||||||
@ -436,10 +432,6 @@ static void hdlcd_drm_unbind(struct device *dev)
|
|||||||
pm_runtime_put_sync(drm->dev);
|
pm_runtime_put_sync(drm->dev);
|
||||||
pm_runtime_disable(drm->dev);
|
pm_runtime_disable(drm->dev);
|
||||||
of_reserved_mem_device_release(drm->dev);
|
of_reserved_mem_device_release(drm->dev);
|
||||||
if (!IS_ERR(hdlcd->clk)) {
|
|
||||||
devm_clk_put(drm->dev, hdlcd->clk);
|
|
||||||
hdlcd->clk = NULL;
|
|
||||||
}
|
|
||||||
drm_mode_config_cleanup(drm);
|
drm_mode_config_cleanup(drm);
|
||||||
drm_dev_unregister(drm);
|
drm_dev_unregister(drm);
|
||||||
drm_dev_unref(drm);
|
drm_dev_unref(drm);
|
||||||
|
Loading…
Reference in New Issue
Block a user