Commit 2bbe32f7 authored by Liu Ying's avatar Liu Ying Committed by Philipp Zabel

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: default avatarLiu Ying <gnuiyl@gmail.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 32c26a56
...@@ -280,11 +280,7 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, ...@@ -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); ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w);
if (ret) {
dev_err(dev, "initializing dmfc channel failed with %d\n", ret);
return ret;
}
ret = ipu_dmfc_alloc_bandwidth(ipu_plane->dmfc, ret = ipu_dmfc_alloc_bandwidth(ipu_plane->dmfc,
calc_bandwidth(crtc_w, crtc_h, calc_bandwidth(crtc_w, crtc_h,
......
...@@ -350,7 +350,7 @@ int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, ...@@ -350,7 +350,7 @@ int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc,
} }
EXPORT_SYMBOL_GPL(ipu_dmfc_alloc_bandwidth); 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; struct ipu_dmfc_priv *priv = dmfc->priv;
u32 dmfc_gen1; u32 dmfc_gen1;
...@@ -367,8 +367,6 @@ int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) ...@@ -367,8 +367,6 @@ int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width)
writel(dmfc_gen1, priv->base + DMFC_GENERAL1); writel(dmfc_gen1, priv->base + DMFC_GENERAL1);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
return 0;
} }
EXPORT_SYMBOL_GPL(ipu_dmfc_init_channel); EXPORT_SYMBOL_GPL(ipu_dmfc_init_channel);
......
...@@ -237,7 +237,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc); ...@@ -237,7 +237,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc);
int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc,
unsigned long bandwidth_mbs, int burstsize); unsigned long bandwidth_mbs, int burstsize);
void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc); 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); struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel);
void ipu_dmfc_put(struct dmfc_channel *dmfc); void ipu_dmfc_put(struct dmfc_channel *dmfc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment