[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZxpa6z0zD+vgEV10NLG_CXOvYYr1BSwr_fEDfc_Pxf-w@mail.gmail.com>
Date: Thu, 12 Mar 2020 14:53:40 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Sergey.Semin@...kalelectronics.ru
Cc: Hoan Tran <hoan@...amperecomputing.com>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Serge Semin <fancer.lancer@...il.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Paul Burton <paulburton@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] gpio: dwapb: Use optional-clocks interface for APB ref-clocks
Hi Sergey,
thanks for your patch!
On Fri, Mar 6, 2020 at 2:25 PM <Sergey.Semin@...kalelectronics.ru> wrote:
> /* Optional bus clock */
> - gpio->clk = devm_clk_get(&pdev->dev, "bus");
> - if (!IS_ERR(gpio->clk)) {
> - err = clk_prepare_enable(gpio->clk);
> - if (err) {
> - dev_info(&pdev->dev, "Cannot enable clock\n");
> - return err;
> - }
> + gpio->clk = devm_clk_get_optional(&pdev->dev, "bus");
> + if (IS_ERR(gpio->clk)) {
> + dev_info(&pdev->dev, "Cannot get APB clock\n");
Turn this into dev_err() while you're at it.
> + err = clk_prepare_enable(gpio->clk);
> + if (err) {
> + dev_info(&pdev->dev, "Cannot enable APB clock\n");
Also this.
With those changes:
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists