drm/exynos/ipp: correct ipp_id field initialization
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 19 May 2014 10:54:04 +0000 (12:54 +0200)
committerInki Dae <daeinki@gmail.com>
Sun, 1 Jun 2014 17:07:10 +0000 (02:07 +0900)
prop_list.ipp_id field is not initialized properly.
The patch fixes it, additionally it removes redundant field from ippdrv.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_ipp.c
drivers/gpu/drm/exynos/exynos_drm_ipp.h

index 5aaf21f1a2a23308bdebed9d2baf9ac7af94c790..e6ef4159878904419f0bf3bfcc839bb7690ae4f4 100644 (file)
@@ -1699,23 +1699,21 @@ static int ipp_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
 
        /* get ipp driver entry */
        list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
+               u32 ipp_id;
+
                ippdrv->drm_dev = drm_dev;
 
                ret = ipp_create_id(&ctx->ipp_idr, &ctx->ipp_lock, ippdrv,
-                       &ippdrv->ipp_id);
-               if (ret) {
+                                   &ipp_id);
+               if (ret || ipp_id == 0) {
                        DRM_ERROR("failed to create id.\n");
                        goto err_idr;
                }
 
                DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]ipp_id[%d]\n",
-                       count++, (int)ippdrv, ippdrv->ipp_id);
+                       count++, (int)ippdrv, ipp_id);
 
-               if (ippdrv->ipp_id == 0) {
-                       DRM_ERROR("failed to get ipp_id[%d]\n",
-                               ippdrv->ipp_id);
-                       goto err_idr;
-               }
+               ippdrv->prop_list->ipp_id = ipp_id;
 
                /* store parent device for node */
                ippdrv->parent_dev = dev;
index ab1634befc05fd11e7766f1b537ae0f039af91bc..4aa71b21657a31e9fc3d0eee45feaefadb73c6e2 100644 (file)
@@ -160,7 +160,6 @@ struct exynos_drm_ippdrv {
        struct device   *parent_dev;
        struct device   *dev;
        struct drm_device       *drm_dev;
-       u32     ipp_id;
        bool    dedicated;
        struct exynos_drm_ipp_ops       *ops[EXYNOS_DRM_OPS_MAX];
        struct workqueue_struct *event_workq;