diff options
author | Liu Ying <gnuiyl@gmail.com> | 2016-03-14 04:10:09 -0400 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-03-31 05:24:31 -0400 |
commit | 2bbe32f7398c9b38916983b5823e11d6aaa10be2 (patch) | |
tree | 9a5b22c54b4af8140b6bfa4f5d75beacaa9c95e1 | |
parent | 32c26a56af3ae823a883e926b96e3ff00854e6a8 (diff) |
gpu: ipu-v3: ipu-dmfc: Make function ipu_dmfc_init_channel() return void
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>
-rw-r--r-- | drivers/gpu/drm/imx/ipuv3-plane.c | 6 | ||||
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-dmfc.c | 4 | ||||
-rw-r--r-- | include/video/imx-ipu-v3.h | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 79df1847a365..2395b4bfa2b2 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c | |||
@@ -280,11 +280,7 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, | |||
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
283 | ret = ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w); | 283 | ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w); |
284 | if (ret) { | ||
285 | dev_err(dev, "initializing dmfc channel failed with %d\n", ret); | ||
286 | return ret; | ||
287 | } | ||
288 | 284 | ||
289 | ret = ipu_dmfc_alloc_bandwidth(ipu_plane->dmfc, | 285 | ret = ipu_dmfc_alloc_bandwidth(ipu_plane->dmfc, |
290 | calc_bandwidth(crtc_w, crtc_h, | 286 | calc_bandwidth(crtc_w, crtc_h, |
diff --git a/drivers/gpu/ipu-v3/ipu-dmfc.c b/drivers/gpu/ipu-v3/ipu-dmfc.c index 129ccfa9d1d6..3aa98784c80d 100644 --- a/drivers/gpu/ipu-v3/ipu-dmfc.c +++ b/drivers/gpu/ipu-v3/ipu-dmfc.c | |||
@@ -350,7 +350,7 @@ out: | |||
350 | } | 350 | } |
351 | EXPORT_SYMBOL_GPL(ipu_dmfc_alloc_bandwidth); | 351 | EXPORT_SYMBOL_GPL(ipu_dmfc_alloc_bandwidth); |
352 | 352 | ||
353 | int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) | 353 | void ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) |
354 | { | 354 | { |
355 | struct ipu_dmfc_priv *priv = dmfc->priv; | 355 | struct ipu_dmfc_priv *priv = dmfc->priv; |
356 | u32 dmfc_gen1; | 356 | u32 dmfc_gen1; |
@@ -367,8 +367,6 @@ int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) | |||
367 | writel(dmfc_gen1, priv->base + DMFC_GENERAL1); | 367 | writel(dmfc_gen1, priv->base + DMFC_GENERAL1); |
368 | 368 | ||
369 | mutex_unlock(&priv->mutex); | 369 | mutex_unlock(&priv->mutex); |
370 | |||
371 | return 0; | ||
372 | } | 370 | } |
373 | EXPORT_SYMBOL_GPL(ipu_dmfc_init_channel); | 371 | EXPORT_SYMBOL_GPL(ipu_dmfc_init_channel); |
374 | 372 | ||
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index aa921052e7a6..8555d3728b52 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
@@ -237,7 +237,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc); | |||
237 | int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, | 237 | int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, |
238 | unsigned long bandwidth_mbs, int burstsize); | 238 | unsigned long bandwidth_mbs, int burstsize); |
239 | void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc); | 239 | void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc); |
240 | int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width); | 240 | void ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width); |
241 | struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel); | 241 | struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel); |
242 | void ipu_dmfc_put(struct dmfc_channel *dmfc); | 242 | void ipu_dmfc_put(struct dmfc_channel *dmfc); |
243 | 243 | ||