From patchwork Mon Oct 30 00:46:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou.Yang@microchip.com X-Patchwork-Id: 10031853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 344D9600C5 for ; Mon, 30 Oct 2017 00:50:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261C4285A0 for ; Mon, 30 Oct 2017 00:50:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A1D02873F; Mon, 30 Oct 2017 00:50:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 925F9285A0 for ; Mon, 30 Oct 2017 00:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751695AbdJ3Au3 (ORCPT ); Sun, 29 Oct 2017 20:50:29 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:46164 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbdJ3Au2 (ORCPT ); Sun, 29 Oct 2017 20:50:28 -0400 Received: from apsmtp01.atmel.com (10.168.254.31) by eusmtp01.atmel.com (10.145.145.30) with Microsoft SMTP Server id 14.3.235.1; Mon, 30 Oct 2017 01:50:17 +0100 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.3.235.1; Mon, 30 Oct 2017 08:56:47 +0800 From: Wenyou Yang To: Mauro Carvalho Chehab CC: , Nicolas Ferre , Sakari Ailus , "Jonathan Corbet" , Hans Verkuil , , Linux Media Mailing List , Wenyou Yang Subject: [PATCH] media: atmel-isc: Fix clock ID for clk_prepare/unprepare Date: Mon, 30 Oct 2017 08:46:50 +0800 Message-ID: <20171030004650.15571-1-wenyou.yang@microchip.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the clock ID to do the runtime pm should be ISC_ISPCK, instead of ISC_MCK in clk_prepare(), clk_unprepare() and isc_clk_is_enabled(). Signed-off-by: Wenyou Yang Acked-by: Sakari Ailus --- drivers/media/platform/atmel/atmel-isc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index 2c40a7886542..9294ff0c7b83 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -598,7 +598,7 @@ static int isc_clk_prepare(struct clk_hw *hw) { struct isc_clk *isc_clk = to_isc_clk(hw); - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_get_sync(isc_clk->dev); return isc_wait_clk_stable(hw); @@ -610,7 +610,7 @@ static void isc_clk_unprepare(struct clk_hw *hw) isc_wait_clk_stable(hw); - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_put_sync(isc_clk->dev); } @@ -657,12 +657,12 @@ static int isc_clk_is_enabled(struct clk_hw *hw) struct isc_clk *isc_clk = to_isc_clk(hw); u32 status; - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_get_sync(isc_clk->dev); regmap_read(isc_clk->regmap, ISC_CLKSR, &status); - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_put_sync(isc_clk->dev); return status & ISC_CLK(isc_clk->id) ? 1 : 0;