Re: [PATCH 03/10] i2c-designware: retrieve clock frequency based CONFIG_HAVE_CLK

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

 



On 2/3/2011 11:20 AM, dirk.brandewie@xxxxxxxxx wrote:
> +u32 i2c_dw_clk_get_rate(struct dw_i2c_dev *dev)
> +{
> +#ifndef CONFIG_HAVE_CLK
> +	return dev->clk_khz;
> +#else
> +	return clk_get_rate(dev->clk)/1000;
> +#endif
> +}
> +

As pointed out before, I prefer not use #ifndef like this:

#ifdef CONFIG_HAVE_CLK
	return clk_get_rate(dev->clk)/1000;
#else
	return dev->clk_khz;
#endif


> @@ -76,7 +85,6 @@ void dw_writel(struct dw_i2c_dev *dev, u32 b, int offset)
>  	writel(b, dev->base + offset);
>  }
>  
> -
>  static u32
>  i2c_dw_scl_hcnt(u32 ic_clk, u32 tSYMBOL, u32 tf, int cond, int offset)
>  {

Unnecessary empty line.

As for the rest, this is ok.
-- 
Shinya Kuribayashi
Renesas Electronics
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux