Re: [PATCH v2 1/1] serial: 8250_bcm7271: Use devm_clk_get_optional_enabled()

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

 



Hi Andy,

[...]

> -	baud_mux_clk = devm_clk_get(dev, "sw_baud");
> -	if (IS_ERR(baud_mux_clk)) {
> -		if (PTR_ERR(baud_mux_clk) == -EPROBE_DEFER) {
> -			ret = -EPROBE_DEFER;
> -			goto release_dma;
> -		}
> -		dev_dbg(dev, "BAUD MUX clock not specified\n");
> -	} else {
> +	baud_mux_clk = devm_clk_get_optional_enabled(dev, "sw_baud");
> +	ret = PTR_ERR_OR_ZERO(baud_mux_clk);
> +	if (ret)
> +		goto release_dma;
> +	if (baud_mux_clk) {
>  		dev_dbg(dev, "BAUD MUX clock found\n");
> -		ret = clk_prepare_enable(baud_mux_clk);
> -		if (ret)
> -			goto release_dma;
> +
>  		priv->baud_mux_clk = baud_mux_clk;
>  		init_real_clk_rates(dev, priv);
>  		clk_rate = priv->default_mux_rate;
> +	} else {
> +		dev_dbg(dev, "BAUD MUX clock not specified\n");

little behavioral change here, but I don't think this is a
problem.

Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx> 

Thanks,
Andi



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux