Re: [PATCH 3/9] ARM: EXYNOS: add initial setup-i2c0 for EXYNOS5

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

 



Hi,

On Tue, Jan 31, 2012 at 7:39 AM, Kukjin Kim <kgene.kim@xxxxxxxxxxx> wrote:
> Signed-off-by: Kukjin Kim <kgene.kim@xxxxxxxxxxx>

A brief patch description, please.

> diff --git a/arch/arm/mach-exynos/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c
> index d395bd1..3244f3e 100644
> --- a/arch/arm/mach-exynos/setup-i2c0.c
> +++ b/arch/arm/mach-exynos/setup-i2c0.c
> @@ -1,7 +1,7 @@
>  /*
> - * linux/arch/arm/mach-exynos4/setup-i2c0.c
> + * linux/arch/arm/mach-exynos/setup-i2c0.c

The file name fills very little purpose in files like these. Consider
removing them at some point.

> @@ -18,9 +18,14 @@ struct platform_device; /* don't need the contents */
>  #include <linux/gpio.h>
>  #include <plat/iic.h>
>  #include <plat/gpio-cfg.h>
> +#include <plat/cpu.h>
>
>  void s3c_i2c0_cfg_gpio(struct platform_device *dev)
>  {
> -       s3c_gpio_cfgall_range(EXYNOS4_GPD1(0), 2,
> -                             S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
> +       if (soc_is_exynos5250())
> +               ;
> +               /* will be implemented with gpio function */
> +       else
> +               s3c_gpio_cfgall_range(EXYNOS4_GPD1(0), 2,
> +                                     S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
>  }

The above is pretty awkward. It's cleaner to return and avoid the else
side of the statement (move the comment accordingly, of course).


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux