Re: [PATCH 11/21] ARM: OMAP: McBSP: Prepare for splitting into omap1 and omap2 code

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

 



On Fri, Jun 06, 2008 at 06:30:43PM -0700, Tony Lindgren wrote:
> +#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
> +
> +static struct platform_device omap_mcbsp_devices[OMAP_MAX_MCBSP_COUNT];
> +static int mcbsps_configured;
> +
> +void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
> +					int size)
> +{
> +	int i;
> +
> +	if (size > OMAP_MAX_MCBSP_COUNT) {
> +		printk(KERN_WARNING "Registered too many McBSPs platform_data."
> +			" Using maximum (%d) available.\n",
> +			OMAP_MAX_MCBSP_COUNT);
> +		size = OMAP_MAX_MCBSP_COUNT;
> +	}
> +
> +	for (i = 0; i < size; i++) {
> +		struct platform_device *new_mcbsp = &omap_mcbsp_devices[i];

Any reason this can't use the platform_device_alloc() API rather than
having a static restriction on the number (coupled with the wastage of
space for smaller 'size's ?)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux