drm/exynos: remove standalone exynos_drm_crtc leftovers
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 31 Dec 2018 12:46:57 +0000 (13:46 +0100)
committerAndrzej Hajda <a.hajda@samsung.com>
Wed, 20 Mar 2019 11:48:11 +0000 (12:48 +0100)
Since exynos_drm_crtc is always embedded exynos_drm_crtc_create helper and
ctx field can be removed.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_crtc.h
drivers/gpu/drm/exynos/exynos_drm_drv.h

index 4ff1e0ff22558c44f31ae8a0284fe36158f71d44..72e224e80565c34b13b2044ff209e77df122fc0f 100644 (file)
@@ -182,41 +182,6 @@ int exynos_drm_crtc_init(struct exynos_drm_crtc *exynos_crtc,
                                         &exynos_crtc_funcs, NULL);
 }
 
-struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
-                                       struct drm_plane *plane,
-                                       enum exynos_drm_output_type type,
-                                       const struct exynos_drm_crtc_ops *ops,
-                                       void *ctx)
-{
-       struct exynos_drm_crtc *exynos_crtc;
-       struct drm_crtc *crtc;
-       int ret;
-
-       exynos_crtc = kzalloc(sizeof(*exynos_crtc), GFP_KERNEL);
-       if (!exynos_crtc)
-               return ERR_PTR(-ENOMEM);
-
-       exynos_crtc->type = type;
-       exynos_crtc->ops = ops;
-       exynos_crtc->ctx = ctx;
-
-       crtc = &exynos_crtc->base;
-
-       ret = drm_crtc_init_with_planes(drm_dev, crtc, plane, NULL,
-                                       &exynos_crtc_funcs, NULL);
-       if (ret < 0)
-               goto err_crtc;
-
-       drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs);
-
-       return exynos_crtc;
-
-err_crtc:
-       plane->funcs->destroy(plane);
-       kfree(exynos_crtc);
-       return ERR_PTR(ret);
-}
-
 struct exynos_drm_crtc *exynos_drm_crtc_get_by_type(struct drm_device *drm_dev,
                                       enum exynos_drm_output_type out_type)
 {
index 9e35a9e02332620e6e51cba33782e33d7da8e9f7..7b0c964521fa75e75d176c9044f4866d13ba7f5a 100644 (file)
 
 int exynos_drm_crtc_init(struct exynos_drm_crtc *exynos_crtc,
                         struct drm_device *drm_dev);
-struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
-                                       struct drm_plane *plane,
-                                       enum exynos_drm_output_type out_type,
-                                       const struct exynos_drm_crtc_ops *ops,
-                                       void *context);
 void exynos_drm_crtc_wait_pending_update(struct exynos_drm_crtc *exynos_crtc);
 void exynos_drm_crtc_finish_update(struct exynos_drm_crtc *exynos_crtc,
                                   struct exynos_drm_plane *exynos_plane);
index 1d4ef02459581955519d83eb17e6f1f2e1d9552c..82af112be03d1dd38a31114fbfd86745ae278618 100644 (file)
@@ -147,14 +147,12 @@ struct exynos_drm_clk {
  * @base: crtc object.
  * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI.
  * @ops: pointer to callbacks for exynos drm specific functionality
- * @ctx: A pointer to the crtc's implementation specific context
  * @pipe_clk: A pointer to the crtc's pipeline clock.
  */
 struct exynos_drm_crtc {
        struct drm_crtc                 base;
        enum exynos_drm_output_type     type;
        const struct exynos_drm_crtc_ops        *ops;
-       void                            *ctx;
        struct exynos_drm_clk           *pipe_clk;
        bool                            i80_mode : 1;
 };