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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to