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

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

 



Hi Sergei

> From: Vladimir Barinov <vladimir.barinov@xxxxxxxxxxxxxxxxxx>
> 
> Add VIN clocks and platform devices for R8A7779 SoC; add function to register
> the VIN platform devices.
> 
> Signed-off-by: Vladimir Barinov <vladimir.barinov@xxxxxxxxxxxxxxxxxx>
> [Sergei: renamed some variables]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>
(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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux