> -----Original Message-----
> From: David Brownell [mailto:[email protected]]
> Sent: Friday, May 15, 2009 1:34 AM
> To: [email protected]
> Cc: Chaithrika U S
> Subject: Re: [PATCH] ASoC: Correct the resource structure assignment
> 
> On Wednesday 13 May 2009, Chaithrika U S wrote:
> > Assign the platform resource structures according to the EVMs used.
> 
> Right, I wonder how this worked before??  Was there some
> other bug covering for this one?
> 
This bug was introduced in the commit where a merge to 2.6.30-rc2 was done.
(commit 79483b52ee44f38d289e8258d27087e84f4b6fe2)
Prior to that it was correct.

> I merged this into the patches I just sent to mainline.
> If it breaks anything, it will only be for the dm355,
> which isn't expected to work in mainline.
> 

OK. 

Thanks,
Chaithrika

> - Dave
> 
> 
> >
> > Signed-off-by: Chaithrika U S <[email protected]>
> > ---
> >  sound/soc/davinci/davinci-evm.c |    8 +++++---
> >  1 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/sound/soc/davinci/davinci-evm.c
> b/sound/soc/davinci/davinci-evm.c
> > index 45912b4..4ddb13d 100644
> > --- a/sound/soc/davinci/davinci-evm.c
> > +++ b/sound/soc/davinci/davinci-evm.c
> > @@ -199,13 +199,14 @@ static int __init evm_init(void)
> >  {
> >     struct resource *resources;
> >     struct evm_snd_platform_data *data;
> > -   int index;
> > +   int index, res_size;
> >     int ret;
> >
> >     if (machine_is_davinci_evm()) {
> >             davinci_cfg_reg(DM644X_MCBSP);
> >
> >             resources = evm_snd_resources;
> > +           res_size = ARRAY_SIZE(evm_snd_resources);
> >             data = &evm_snd_data;
> >             index = 0;
> >     } else if (machine_is_davinci_dm355_evm()) {
> > @@ -214,6 +215,7 @@ static int __init evm_init(void)
> >             davinci_cfg_reg(DM355_EVT9_ASP1_RX);
> >
> >             resources = dm335evm_snd_resources;
> > +           res_size = ARRAY_SIZE(dm335evm_snd_resources);
> >             data = &dm335evm_snd_data;
> >             index = 1;
> >     } else
> > @@ -227,8 +229,8 @@ static int __init evm_init(void)
> >     evm_snd_devdata.dev = &evm_snd_device->dev;
> >     platform_device_add_data(evm_snd_device, data, sizeof(*data));
> >
> > -   ret = platform_device_add_resources(evm_snd_device,
> evm_snd_resources,
> > -                                       ARRAY_SIZE(evm_snd_resources));
> > +   ret = platform_device_add_resources(evm_snd_device, resources,
> > +                                                           res_size);
> >     if (ret) {
> >             platform_device_put(evm_snd_device);
> >             return ret;
> > --
> >



_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to