On Thu, Aug 14, 2008 at 11:55:07AM +0300, Mike Rapoport wrote:
> diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
> index 041c048..13a786d 100644
> --- a/arch/arm/mach-pxa/generic.h
> +++ b/arch/arm/mach-pxa/generic.h
> @@ -9,9 +9,10 @@
>   * published by the Free Software Foundation.
>   */
> 
> -typedef int (*set_wake_t)(unsigned int, unsigned int);
> +typedef int (*set_wake_t) (unsigned int, unsigned int);

Undoes perfectly good formatting.

> @@ -982,10 +992,13 @@ static int i2c_pxa_probe(struct platform_device *dev)
>       snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u",
>                i2c->adap.nr);
> 
> -     i2c->clk = clk_get(&dev->dev, "I2CCLK");
> -     if (IS_ERR(i2c->clk)) {
> -             ret = PTR_ERR(i2c->clk);
> -             goto eclk;
> +     /* PXA3xx has power I2C clock always on */
> +     if (!(cpu_is_pxa3xx() && i2c->adap.nr == 1)) {
> +             i2c->clk = clk_get(&dev->dev, "I2CCLK");
> +             if (IS_ERR(i2c->clk)) {
> +                     ret = PTR_ERR(i2c->clk);
> +                     goto eclk;
> +             }

Umm, no.  It would be far better to provide a dummy clock rather than
mess drivers up with this and lots of other conditional stuff.

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to