[PATCH 2/4] ARM: shmobile: r8a7779: add VIN support

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Apr 17 20:48:05 EDT 2013


Hi Sergei

> From: Vladimir Barinov <vladimir.barinov at cogentembedded.com>
> 
> Add VIN clocks and platform devices for R8A7779 SoC; add function to register
> the VIN platform devices.
> 
> Signed-off-by: Vladimir Barinov <vladimir.barinov at cogentembedded.com>
> [Sergei: renamed some variables]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov at cogentembedded.com>
(snip)
> +void __init r8a7779_add_vin_device(int id,
> +				   struct rcar_vin_platform_data *pdata)
> +{
> +	vin_info_table[id]->data = pdata;
> +	vin_info_table[id]->size_data = sizeof(struct rcar_vin_platform_data);
> +
> +	platform_device_register_full(vin_info_table[id]);
> +}

Can you add "id" check here ?

BUG_ON(id < 0 || id >= ARRAY_SIZE(vin_info_table));
or similar

Best regards
---
Kuninori Morimoto



More information about the linux-arm-kernel mailing list