Hi Xia, On Tue, Aug 04, 2020 at 11:40:56AM +0800, Xia Jiang wrote: > Use the generic clk_bulk_* helpers to enable and disable clocks. > > Signed-off-by: Xia Jiang <xia.jiang@xxxxxxxxxxxx> > --- > v11: specify the names of the clocks in the driver > --- > .../media/platform/mtk-jpeg/mtk_jpeg_core.c | 28 +++++++++++++------ > .../media/platform/mtk-jpeg/mtk_jpeg_core.h | 8 +++--- > 2 files changed, 23 insertions(+), 13 deletions(-) > Thank you for the patch. It looks good to me. Reviewed-by: Tomasz Figa <tfiga@xxxxxxxxxxxx> One comment below about a thing that should be fixed in the future, separately from this series. > diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c > index 7881e9c93df7..47d570f32e3f 100644 > --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c > +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c > @@ -783,14 +783,15 @@ static void mtk_jpeg_clk_on(struct mtk_jpeg_dev *jpeg) > ret = mtk_smi_larb_get(jpeg->larb); > if (ret) > dev_err(jpeg->dev, "mtk_smi_larb_get larbvdec fail %d\n", ret); > - clk_prepare_enable(jpeg->clk_jdec_smi); > - clk_prepare_enable(jpeg->clk_jdec); > + > + ret = clk_bulk_prepare_enable(jpeg->num_clks, jpeg->clks); > + if (ret) > + dev_err(jpeg->dev, "Failed to open jpeg clk: %d\n", ret); The errors in this function should be propagated to the caller and handled properly across the whole call stack. Best regards, Tomasz