Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp583283pxb; Thu, 31 Mar 2022 12:09:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVVcH5zmiqqLZVGZ8zfI1IE96WLA3Kfaw2zVnF2tpljWvFiUmxhZQ7l+o0iqgguM4z6MPW X-Received: by 2002:a05:6402:350c:b0:419:3cb8:b714 with SMTP id b12-20020a056402350c00b004193cb8b714mr17759198edd.297.1648753797437; Thu, 31 Mar 2022 12:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648753797; cv=none; d=google.com; s=arc-20160816; b=l9THIwmPKGPfjT3iAAHvDaCI2pQgkLgafipx0GcVQmpKERwDvsRKOC81S32lK4lLFb jNZn2lPqFZpmIHvo8GglUNFXSZKWT/EUJ1f+lbLedtebPELyMI1oghdrpDBE/mdsBXkX sfXQVTyB36lZ2R7APQtcT1Avd89vhsE+RnGZLHwQxaKoje0Zg2Ti6/TR4iNUCzih0+yt AtaHmCwrLZ7vv5nTLNxpejzMO4Yp40vzrnxAapD43n/IwV+zJM9j4TeDmSNTl6HP2mb7 CBjsR8XflVqsDReam/djyKhzUwrAFG0S1OhrL9B+gj51zW0cOB3OlvC6Jfb2NpQRFYfI QMBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vTy2Og6/ksiOjfSxA2VkXzzf/gIJdlseQLiXWZzscsE=; b=HRAYm64KIyeNtrivH/HNDa2tOj4ojeD0wBiMlgnjUsU9DTo+LNMAyjX6YsLbdMWgb7 bnFEdjizsO4fBc0TZSzSuNGFTNl6RcEBfeSR1eigLhUqiz5GU8xucTj80TK5hjxYT5l1 Bjkdl9oAlyiRb9fx48AhiHEH7MjE3J8WrVbzMCZ8dXHGRgTtLsZm0tNnNyEPv3yccb6L C6CFLbgIk0Ju9uF8NKkJObq34XBWvfy6Y41GOuQHTXETp8N4CKs7IuLcnDS62/EvUbDv VvVOE91BdVzvVxZi30/8K9vFqFRKmPQ2ZsCMaPBrOy8fkugZcPmKzqUFyaaqz1Me/J3i 5thA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CkC9oZhm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170906154d00b006df76385d2csi241726ejd.460.2022.03.31.12.09.31; Thu, 31 Mar 2022 12:09:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CkC9oZhm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234484AbiCaSbY (ORCPT + 99 others); Thu, 31 Mar 2022 14:31:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233255AbiCaSbV (ORCPT ); Thu, 31 Mar 2022 14:31:21 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6305109A7A; Thu, 31 Mar 2022 11:29:31 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id d5so654166lfj.9; Thu, 31 Mar 2022 11:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vTy2Og6/ksiOjfSxA2VkXzzf/gIJdlseQLiXWZzscsE=; b=CkC9oZhm5QLkzYE/EiXhlDW4YV4w/ZBdhMZ3ktKWhv2pD8YP0v1rVkkPWgQU6rLf+O iFzDZP3yMlAk08gwJTX8Oz4SyLSYUWtp456eZxDjEQoLkGaqJdg6zGolsGo+O53fHvfm Hm6tqFiyADHJi2RFPz8ojcbjuOcZlk+BGHuvbBtM7SfNlLLDbP2PLh34P4xErnIC7KOp MHodTinEHnPinj8B2Eg5PAobpBrqMJkZN4ZjlyAqJA0CTy/nBSV1naxSJCvUTQ2MPaWP CvmaFiFM6+G0sqN0GWj713bBV67u7X6eY7k+AIeIvbSV5cWwkM6aylyL0S/FzL8ndlE9 L3fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vTy2Og6/ksiOjfSxA2VkXzzf/gIJdlseQLiXWZzscsE=; b=fOFiUS6yVv/EMz8jPXG5dkkPmT5GFJHI6fEzHDlUt5ktpe46/06vH2PLydsRJck5uP pO5lv0Ngevydt8Y/ThoU/5tXqTkhxD1nJiutl4Cz2hN66ZRQhelZE3TqeJ2yowDlordx ejDeeecnZDqFmw9Be1JPigjtPSZYQW0zrvhEDnlb2Kh9KE21QxRacGVhg5fRsJxAgB2y NsO+wmI1D6y3Qu5Dxo1mkY4tXoIi4pdE9bD8cJCKUhFwbIe1tM62MQK/Nai85Cs7qpnP w8dY2eZ484xcZPvvsyEPoiiUG/Vck6RcWUN8z35T+sxS8yQPZw8O6uvXdXRr0mCrxK1M crzw== X-Gm-Message-State: AOAM533PuSn/kCo2JK9iXOq6Fhe51Gkl/6Mz7mo0yX2Mzyc8sqpPKERh B7hggqV4niSPKdqhluO6Lmg= X-Received: by 2002:a05:6512:2308:b0:44a:7562:9e25 with SMTP id o8-20020a056512230800b0044a75629e25mr11224488lfu.37.1648751369614; Thu, 31 Mar 2022 11:29:29 -0700 (PDT) Received: from dell.intranet (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id bu1-20020a056512168100b004437db5e773sm13378lfb.94.2022.03.31.11.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 11:29:28 -0700 (PDT) From: Janusz Krzysztofik To: Ulf Hansson Cc: Tony Lindgren , Paul Walmsley , Aaro Koskinen , Alan Stern , Greg Kroah-Hartman , Helge Deller , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Felipe Balbi , Peter Ujfalusi , Liam Girdwood , Mark Brown , linux-mmc@vger.kernel.org, alsa-devel@alsa-project.org, Janusz Krzysztofik Subject: Re: [PATCH v2] ARM: OMAP1: Prepare for conversion of OMAP1 clocks to CCF Date: Thu, 31 Mar 2022 20:29:26 +0200 Message-ID: <3657229.kQq0lBPeGt@dell> In-Reply-To: References: <20220310233307.99220-3-jmkrzyszt@gmail.com> <20220321215416.236250-1-jmkrzyszt@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Uffe, On Thursday, 31 March 2022 11:19:43 CEST Ulf Hansson wrote: > On Mon, 21 Mar 2022 at 22:54, Janusz Krzysztofik wrote: > > > > In preparation for conversion of OMAP1 clocks to common clock framework, > > identify users of those clocks which don't call clk_prepare/unprepare() > > and update them to call clk_prepare_enable/clk_disable_unprepare() instead > > of just clk_enable/disable(), as required by CCF implementation of clock > > API. > > > > v2: update still a few more OMAP specific drivers missed in v1, > > - call clk_prepare/unprepare() just after/before clk_get/put() where it > > can make more sense than merging prepare/unprepare with enable/disable. > > > > Signed-off-by: Janusz Krzysztofik > > Is there a specific reason why you can't split this into a per subsystem patch? > > Don't get me wrong, if you need my ack you have it, but I just wanted > to know why this is? There is no specific reason, I just didn't think of that, and indeed, that is perfectly possible and will be more easy to handle. Please expect a separate patch for each subsystem soon. Thanks, Janusz > > Kind regards > Uffe > > > --- > > arch/arm/mach-omap1/mcbsp.c | 8 ++++---- > > arch/arm/mach-omap1/ocpi.c | 4 ++-- > > arch/arm/mach-omap1/serial.c | 6 +++--- > > arch/arm/mach-omap1/timer32k.c | 2 +- > > drivers/mmc/host/omap.c | 23 ++++++++++++++--------- > > drivers/usb/gadget/udc/omap_udc.c | 14 ++++++++------ > > drivers/usb/host/ohci-omap.c | 18 ++++++++++++++++-- > > drivers/video/fbdev/omap/hwa742.c | 6 +++--- > > drivers/video/fbdev/omap/lcdc.c | 6 +++--- > > drivers/video/fbdev/omap/sossi.c | 5 +++-- > > sound/soc/ti/osk5912.c | 9 ++++++++- > > 11 files changed, 65 insertions(+), 36 deletions(-) > > > > diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c > > index f36c34f47f11..3ec2badff6af 100644 > > --- a/arch/arm/mach-omap1/mcbsp.c > > +++ b/arch/arm/mach-omap1/mcbsp.c > > @@ -44,8 +44,8 @@ static void omap1_mcbsp_request(unsigned int id) > > api_clk = clk_get(NULL, "api_ck"); > > dsp_clk = clk_get(NULL, "dsp_ck"); > > if (!IS_ERR(api_clk) && !IS_ERR(dsp_clk)) { > > - clk_enable(api_clk); > > - clk_enable(dsp_clk); > > + clk_prepare_enable(api_clk); > > + clk_prepare_enable(dsp_clk); > > > > /* > > * DSP external peripheral reset > > @@ -63,11 +63,11 @@ static void omap1_mcbsp_free(unsigned int id) > > if (id == 0 || id == 2) { > > if (--dsp_use == 0) { > > if (!IS_ERR(api_clk)) { > > - clk_disable(api_clk); > > + clk_disable_unprepare(api_clk); > > clk_put(api_clk); > > } > > if (!IS_ERR(dsp_clk)) { > > - clk_disable(dsp_clk); > > + clk_disable_unprepare(dsp_clk); > > clk_put(dsp_clk); > > } > > } > > diff --git a/arch/arm/mach-omap1/ocpi.c b/arch/arm/mach-omap1/ocpi.c > > index 380ea2de58c1..03cc48024fd6 100644 > > --- a/arch/arm/mach-omap1/ocpi.c > > +++ b/arch/arm/mach-omap1/ocpi.c > > @@ -73,7 +73,7 @@ static int __init omap_ocpi_init(void) > > if (IS_ERR(ocpi_ck)) > > return PTR_ERR(ocpi_ck); > > > > - clk_enable(ocpi_ck); > > + clk_prepare_enable(ocpi_ck); > > ocpi_enable(); > > pr_info("OMAP OCPI interconnect driver loaded\n"); > > > > @@ -87,7 +87,7 @@ static void __exit omap_ocpi_exit(void) > > if (!cpu_is_omap16xx()) > > return; > > > > - clk_disable(ocpi_ck); > > + clk_disable_unprepare(ocpi_ck); > > clk_put(ocpi_ck); > > } > > > > diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c > > index 9eb591fbfd89..5f591a836ab5 100644 > > --- a/arch/arm/mach-omap1/serial.c > > +++ b/arch/arm/mach-omap1/serial.c > > @@ -141,7 +141,7 @@ void __init omap_serial_init(void) > > if (IS_ERR(uart1_ck)) > > printk("Could not get uart1_ck\n"); > > else { > > - clk_enable(uart1_ck); > > + clk_prepare_enable(uart1_ck); > > if (cpu_is_omap15xx()) > > clk_set_rate(uart1_ck, 12000000); > > } > > @@ -151,7 +151,7 @@ void __init omap_serial_init(void) > > if (IS_ERR(uart2_ck)) > > printk("Could not get uart2_ck\n"); > > else { > > - clk_enable(uart2_ck); > > + clk_prepare_enable(uart2_ck); > > if (cpu_is_omap15xx()) > > clk_set_rate(uart2_ck, 12000000); > > else > > @@ -163,7 +163,7 @@ void __init omap_serial_init(void) > > if (IS_ERR(uart3_ck)) > > printk("Could not get uart3_ck\n"); > > else { > > - clk_enable(uart3_ck); > > + clk_prepare_enable(uart3_ck); > > if (cpu_is_omap15xx()) > > clk_set_rate(uart3_ck, 12000000); > > } > > diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c > > index 780fdf03c3ce..049c7b7f28c4 100644 > > --- a/arch/arm/mach-omap1/timer32k.c > > +++ b/arch/arm/mach-omap1/timer32k.c > > @@ -180,7 +180,7 @@ int __init omap_32k_timer_init(void) > > > > sync32k_ick = clk_get(NULL, "omap_32ksync_ick"); > > if (!IS_ERR(sync32k_ick)) > > - clk_enable(sync32k_ick); > > + clk_prepare_enable(sync32k_ick); > > > > ret = omap_init_clocksource_32k(base); > > } > > diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c > > index 5e5af34090f1..57d39283924d 100644 > > --- a/drivers/mmc/host/omap.c > > +++ b/drivers/mmc/host/omap.c > > @@ -1374,7 +1374,7 @@ static int mmc_omap_probe(struct platform_device *pdev) > > host->iclk = clk_get(&pdev->dev, "ick"); > > if (IS_ERR(host->iclk)) > > return PTR_ERR(host->iclk); > > - clk_enable(host->iclk); > > + clk_prepare_enable(host->iclk); > > > > host->fclk = clk_get(&pdev->dev, "fck"); > > if (IS_ERR(host->fclk)) { > > @@ -1382,16 +1382,18 @@ static int mmc_omap_probe(struct platform_device *pdev) > > goto err_free_iclk; > > } > > > > + ret = clk_prepare(host->fclk); > > + if (ret) > > + goto err_put_fclk; > > + > > host->dma_tx_burst = -1; > > host->dma_rx_burst = -1; > > > > host->dma_tx = dma_request_chan(&pdev->dev, "tx"); > > if (IS_ERR(host->dma_tx)) { > > ret = PTR_ERR(host->dma_tx); > > - if (ret == -EPROBE_DEFER) { > > - clk_put(host->fclk); > > - goto err_free_iclk; > > - } > > + if (ret == -EPROBE_DEFER) > > + goto err_free_fclk; > > > > host->dma_tx = NULL; > > dev_warn(host->dev, "TX DMA channel request failed\n"); > > @@ -1403,8 +1405,7 @@ static int mmc_omap_probe(struct platform_device *pdev) > > if (ret == -EPROBE_DEFER) { > > if (host->dma_tx) > > dma_release_channel(host->dma_tx); > > - clk_put(host->fclk); > > - goto err_free_iclk; > > + goto err_free_fclk; > > } > > > > host->dma_rx = NULL; > > @@ -1454,9 +1455,12 @@ static int mmc_omap_probe(struct platform_device *pdev) > > dma_release_channel(host->dma_tx); > > if (host->dma_rx) > > dma_release_channel(host->dma_rx); > > +err_free_fclk: > > + clk_unprepare(host->fclk); > > +err_put_fclk: > > clk_put(host->fclk); > > err_free_iclk: > > - clk_disable(host->iclk); > > + clk_disable_unprepare(host->iclk); > > clk_put(host->iclk); > > return ret; > > } > > @@ -1476,8 +1480,9 @@ static int mmc_omap_remove(struct platform_device *pdev) > > > > mmc_omap_fclk_enable(host, 0); > > free_irq(host->irq, host); > > + clk_unprepare(host->fclk); > > clk_put(host->fclk); > > - clk_disable(host->iclk); > > + clk_disable_unprepare(host->iclk); > > clk_put(host->iclk); > > > > if (host->dma_tx) > > diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c > > index 494da00398d7..8768a3280e19 100644 > > --- a/drivers/usb/gadget/udc/omap_udc.c > > +++ b/drivers/usb/gadget/udc/omap_udc.c > > @@ -2604,6 +2604,8 @@ static void omap_udc_release(struct device *dev) > > if (udc->dc_clk) { > > if (udc->clk_requested) > > omap_udc_enable_clock(0); > > + clk_unprepare(udc->hhc_clk); > > + clk_unprepare(udc->dc_clk); > > clk_put(udc->hhc_clk); > > clk_put(udc->dc_clk); > > } > > @@ -2768,8 +2770,8 @@ static int omap_udc_probe(struct platform_device *pdev) > > hhc_clk = clk_get(&pdev->dev, "usb_hhc_ck"); > > BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk)); > > /* can't use omap_udc_enable_clock yet */ > > - clk_enable(dc_clk); > > - clk_enable(hhc_clk); > > + clk_prepare_enable(dc_clk); > > + clk_prepare_enable(hhc_clk); > > udelay(100); > > } > > > > @@ -2778,8 +2780,8 @@ static int omap_udc_probe(struct platform_device *pdev) > > hhc_clk = clk_get(&pdev->dev, "l3_ocpi_ck"); > > BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk)); > > /* can't use omap_udc_enable_clock yet */ > > - clk_enable(dc_clk); > > - clk_enable(hhc_clk); > > + clk_prepare_enable(dc_clk); > > + clk_prepare_enable(hhc_clk); > > udelay(100); > > } > > > > @@ -2927,8 +2929,8 @@ static int omap_udc_probe(struct platform_device *pdev) > > usb_put_phy(xceiv); > > > > if (cpu_is_omap16xx() || cpu_is_omap7xx()) { > > - clk_disable(hhc_clk); > > - clk_disable(dc_clk); > > + clk_disable_unprepare(hhc_clk); > > + clk_disable_unprepare(dc_clk); > > clk_put(hhc_clk); > > clk_put(dc_clk); > > } > > diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c > > index 45dcf8292072..2ab2e089a2b7 100644 > > --- a/drivers/usb/host/ohci-omap.c > > +++ b/drivers/usb/host/ohci-omap.c > > @@ -281,6 +281,10 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev) > > goto err_put_hcd; > > } > > > > + retval = clk_prepare(priv->usb_host_ck); > > + if (retval) > > + goto err_put_host_ck; > > + > > if (!cpu_is_omap15xx()) > > priv->usb_dc_ck = clk_get(&pdev->dev, "usb_dc_ck"); > > else > > @@ -288,13 +292,17 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev) > > > > if (IS_ERR(priv->usb_dc_ck)) { > > retval = PTR_ERR(priv->usb_dc_ck); > > - goto err_put_host_ck; > > + goto err_unprepare_host_ck; > > } > > > > + retval = clk_prepare(priv->usb_dc_ck); > > + if (retval) > > + goto err_put_dc_ck; > > + > > if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { > > dev_dbg(&pdev->dev, "request_mem_region failed\n"); > > retval = -EBUSY; > > - goto err_put_dc_ck; > > + goto err_unprepare_dc_ck; > > } > > > > hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); > > @@ -319,8 +327,12 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev) > > iounmap(hcd->regs); > > err2: > > release_mem_region(hcd->rsrc_start, hcd->rsrc_len); > > +err_unprepare_dc_ck: > > + clk_unprepare(priv->usb_dc_ck); > > err_put_dc_ck: > > clk_put(priv->usb_dc_ck); > > +err_unprepare_host_ck: > > + clk_unprepare(priv->usb_host_ck); > > err_put_host_ck: > > clk_put(priv->usb_host_ck); > > err_put_hcd: > > @@ -355,7 +367,9 @@ static int ohci_hcd_omap_remove(struct platform_device *pdev) > > } > > iounmap(hcd->regs); > > release_mem_region(hcd->rsrc_start, hcd->rsrc_len); > > + clk_unprepare(priv->usb_dc_ck); > > clk_put(priv->usb_dc_ck); > > + clk_unprepare(priv->usb_host_ck); > > clk_put(priv->usb_host_ck); > > usb_put_hcd(hcd); > > return 0; > > diff --git a/drivers/video/fbdev/omap/hwa742.c b/drivers/video/fbdev/omap/hwa742.c > > index b191bef22d98..9d9fe5c3a7a1 100644 > > --- a/drivers/video/fbdev/omap/hwa742.c > > +++ b/drivers/video/fbdev/omap/hwa742.c > > @@ -964,7 +964,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, > > if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0) > > goto err3; > > hwa742.extif->set_timings(&hwa742.reg_timings); > > - clk_enable(hwa742.sys_ck); > > + clk_prepare_enable(hwa742.sys_ck); > > > > calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk); > > if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0) > > @@ -1023,7 +1023,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, > > > > return 0; > > err4: > > - clk_disable(hwa742.sys_ck); > > + clk_disable_unprepare(hwa742.sys_ck); > > err3: > > hwa742.extif->cleanup(); > > err2: > > @@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void) > > hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED); > > hwa742.extif->cleanup(); > > hwa742.int_ctrl->cleanup(); > > - clk_disable(hwa742.sys_ck); > > + clk_disable_unprepare(hwa742.sys_ck); > > } > > > > struct lcd_ctrl hwa742_ctrl = { > > diff --git a/drivers/video/fbdev/omap/lcdc.c b/drivers/video/fbdev/omap/lcdc.c > > index 7317c9aad677..97d20dc0d1d0 100644 > > --- a/drivers/video/fbdev/omap/lcdc.c > > +++ b/drivers/video/fbdev/omap/lcdc.c > > @@ -711,7 +711,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, > > dev_err(fbdev->dev, "failed to adjust LCD rate\n"); > > goto fail1; > > } > > - clk_enable(lcdc.lcd_ck); > > + clk_prepare_enable(lcdc.lcd_ck); > > > > r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev); > > if (r) { > > @@ -746,7 +746,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, > > fail3: > > free_irq(OMAP_LCDC_IRQ, lcdc.fbdev); > > fail2: > > - clk_disable(lcdc.lcd_ck); > > + clk_disable_unprepare(lcdc.lcd_ck); > > fail1: > > clk_put(lcdc.lcd_ck); > > fail0: > > @@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void) > > free_fbmem(); > > omap_free_lcd_dma(); > > free_irq(OMAP_LCDC_IRQ, lcdc.fbdev); > > - clk_disable(lcdc.lcd_ck); > > + clk_disable_unprepare(lcdc.lcd_ck); > > clk_put(lcdc.lcd_ck); > > } > > > > diff --git a/drivers/video/fbdev/omap/sossi.c b/drivers/video/fbdev/omap/sossi.c > > index 80ac67f27f0d..b9cb8b386627 100644 > > --- a/drivers/video/fbdev/omap/sossi.c > > +++ b/drivers/video/fbdev/omap/sossi.c > > @@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev) > > l &= ~CONF_SOSSI_RESET_R; > > omap_writel(l, MOD_CONF_CTRL_1); > > > > - clk_enable(sossi.fck); > > + clk_prepare_enable(sossi.fck); > > l = omap_readl(ARM_IDLECT2); > > l &= ~(1 << 8); /* DMACK_REQ */ > > omap_writel(l, ARM_IDLECT2); > > @@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev) > > return 0; > > > > err: > > - clk_disable(sossi.fck); > > + clk_disable_unprepare(sossi.fck); > > clk_put(sossi.fck); > > return r; > > } > > @@ -657,6 +657,7 @@ static int sossi_init(struct omapfb_device *fbdev) > > static void sossi_cleanup(void) > > { > > omap_lcdc_free_dma_callback(); > > + clk_unprepare(sossi.fck); > > clk_put(sossi.fck); > > iounmap(sossi.base); > > } > > diff --git a/sound/soc/ti/osk5912.c b/sound/soc/ti/osk5912.c > > index 40e29dda7e7a..22da3b335e81 100644 > > --- a/sound/soc/ti/osk5912.c > > +++ b/sound/soc/ti/osk5912.c > > @@ -134,6 +134,10 @@ static int __init osk_soc_init(void) > > goto err2; > > } > > > > + err = clk_prepare(tlv320aic23_mclk); > > + if (err) > > + goto err3; > > + > > /* > > * Configure 12 MHz output on MCLK. > > */ > > @@ -142,7 +146,7 @@ static int __init osk_soc_init(void) > > if (clk_set_rate(tlv320aic23_mclk, CODEC_CLOCK)) { > > printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n"); > > err = -ECANCELED; > > - goto err3; > > + goto err4; > > } > > } > > > > @@ -151,6 +155,8 @@ static int __init osk_soc_init(void) > > > > return 0; > > > > +err4: > > + clk_unprepare(tlv320aic23_mclk); > > err3: > > clk_put(tlv320aic23_mclk); > > err2: > > @@ -164,6 +170,7 @@ static int __init osk_soc_init(void) > > > > static void __exit osk_soc_exit(void) > > { > > + clk_unprepare(tlv320aic23_mclk); > > clk_put(tlv320aic23_mclk); > > platform_device_unregister(osk_snd_device); > > } > > -- > > 2.35.1 > > >