Re: [PATCH v2 12/29] ARM: shmobile: r7s72100: Don't define SCIF platform data in an array

Sergei Shtylyov
2013-11-10T18:35:36Z

Hello.

On 10-11-2013 7:33, Laurent Pinchart wrote:

> The SCIF driver is transitioning to platform resources. Board code will
> thus need to define an array of resources for each SCIF device. This is
> incompatible with the macro-based SCIF platform data definition as an
> array. Rework the macro to define platform data as individual
> structures.

> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> arch/arm/mach-shmobile/setup-r7s72100.c | 49 +++++++++++++++------------------
> 1 file changed, 22 insertions(+), 27 deletions(-)

> diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
> index d4eb509..dbcbb81 100644
> --- a/arch/arm/mach-shmobile/setup-r7s72100.c
> +++ b/arch/arm/mach-shmobile/setup-r7s72100.c
[...]
> @@ -39,35 +39,30 @@
[...]
> -static inline void r7s72100_register_scif(int idx)
> -{
> - platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx],
> - sizeof(struct plat_sci_port));
> -}
> +#define r7s72100_register_scif(index) \
> + platform_device_register_data(&platform_bus, "sh-sci", index, \
> + &scif##index##_platform_data, \
> + sizeof(scif##index##_platform_data))

Not sure why you changes the indentation here, it was alright before the
patch.

WBR, Sergei