gpu: ipu-v3: ipu-dmfc: Make function ipu_dmfc_init_channel() return void
authorLiu Ying <gnuiyl@gmail.com>
Mon, 14 Mar 2016 08:10:09 +0000 (16:10 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 31 Mar 2016 09:24:31 +0000 (11:24 +0200)
Since the function ipu_dmfc_init_channel() always returns zero, we may
change the return type to void to simplify the code.

Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/ipuv3-plane.c
drivers/gpu/ipu-v3/ipu-dmfc.c
include/video/imx-ipu-v3.h

index 79df1847a365a95eefc249552d1e9a823a6e30b6..2395b4bfa2b238db4ccc4e7603ca075aae62a319 100644 (file)
@@ -280,11 +280,7 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc,
                }
        }
 
-       ret = ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w);
-       if (ret) {
-               dev_err(dev, "initializing dmfc channel failed with %d\n", ret);
-               return ret;
-       }
+       ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w);
 
        ret = ipu_dmfc_alloc_bandwidth(ipu_plane->dmfc,
                        calc_bandwidth(crtc_w, crtc_h,
index 129ccfa9d1d604bfcdc7056d810534521fc304ce..3aa98784c80de9ad8147ca364031d3db1218177e 100644 (file)
@@ -350,7 +350,7 @@ out:
 }
 EXPORT_SYMBOL_GPL(ipu_dmfc_alloc_bandwidth);
 
-int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width)
+void ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width)
 {
        struct ipu_dmfc_priv *priv = dmfc->priv;
        u32 dmfc_gen1;
@@ -367,8 +367,6 @@ int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width)
        writel(dmfc_gen1, priv->base + DMFC_GENERAL1);
 
        mutex_unlock(&priv->mutex);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(ipu_dmfc_init_channel);
 
index aa921052e7a631b81a542aad03857512d0e9636c..8555d3728b5206cd65f54a668335a737f688ecf3 100644 (file)
@@ -237,7 +237,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc);
 int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc,
                unsigned long bandwidth_mbs, int burstsize);
 void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc);
-int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width);
+void ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width);
 struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel);
 void ipu_dmfc_put(struct dmfc_channel *dmfc);
 
This page took 0.026296 seconds and 5 git commands to generate.