lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Jan 2015 16:18:52 +0200
From:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:	Viresh Kumar <viresh.linux@...il.com>,
	Vinod Koul <vinod.koul@...el.com>,
	linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org
Subject: Re: [PATCH] dmaengine: dw: support for clockless platforms

On Tue, 2015-01-20 at 14:57 +0200, Heikki Krogerus wrote:
> When requesting clock in the platform driver, leaving
> chip->clk value as NULL if -ENOENT is returned, and
> continue. With other errors returning failure. It makes the
> driver usable on platforms that do not provide the clock.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

Acked-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> ---
>  drivers/dma/dw/platform.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
> index 32ea1ac..b183bc0 100644
> --- a/drivers/dma/dw/platform.c
> +++ b/drivers/dma/dw/platform.c
> @@ -180,8 +180,12 @@ static int dw_probe(struct platform_device *pdev)
>  	chip->dev = dev;
>  
>  	chip->clk = devm_clk_get(chip->dev, "hclk");
> -	if (IS_ERR(chip->clk))
> -		return PTR_ERR(chip->clk);
> +	if (IS_ERR(chip->clk)) {
> +		if (PTR_ERR(chip->clk) == -ENOENT)
> +			chip->clk = NULL;
> +		else
> +			return PTR_ERR(chip->clk);
> +	}
>  	err = clk_prepare_enable(chip->clk);
>  	if (err)
>  		return err;


-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ