Re: [PATCHv2 2/3] spi/spi-xilinx: Add clock support

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

 



On Wed, Mar 09, 2016 at 02:17:21PM +0530, Shubhrajyoti Datta wrote:

> +       xspi->clk = devm_clk_get(&pdev->dev, NULL);
> +       if (IS_ERR(xspi->clk)) {

As someone pointed out on the previous version of the series this will
cause the driver to fail to probe with existing DTs.  We probably need
to explicitly handle a -ENOENT as a "this clock will never appear" or
something.

This also requests a single nameless clock but someone pointed out on
the previous version there are multiple clocks into the IP.  Even if
you only want to add one clock right now the clock should probably be
named so we can scale up.

> +	}
> +	ret = clk_prepare_enable(xspi->clk);

Missing blank line here.

> +	if (ret)
> +		dev_err(&pdev->dev, "Unable to enable clock.\n");
> +

This isn't really checking the return code - if we failed to enable the
clock we should be failing the probe, not just carrying on.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [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