Re: [PATCH] gpio: dwapb: Add support for a bus clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 9, 2018 at 12:34 PM, Phil Edworthy
<phil.edworthy@xxxxxxxxxxx> wrote:
> From: Michel Pollet <michel.pollet@xxxxxxxxxxxxxx>
>
> Enable specified clocks from DTS, if any.
>
> Signed-off-by: Michel Pollet <michel.pollet@xxxxxxxxxxxxxx>

>  #include <linux/spinlock.h>
>  #include <linux/platform_data/gpio-dwapb.h>
>  #include <linux/slab.h>
> +#include <linux/clk.h>

Keep in order.


> +       clk = devm_clk_get(&pdev->dev, NULL);
> +       if (!IS_ERR(clk) && clk_prepare_enable(clk))
> +               dev_info(&pdev->dev, "no clock source\n");

First of all, it shadows any error from clk_prepare_enable(), second,
it misses the clock name.
Next, I don't see how you managed the clock during PM and / or
->remove() operation.

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux