On Fri, Apr 03, 2009 at 06:38:44PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> Mark A. Greer wrote:
>
>> From: "Mark A. Greer" <[email protected]>

>> @@ -522,6 +525,25 @@ static struct platform_device dm355_edma_device = {
>>   
>> /*----------------------------------------------------------------------*/
>>  +static struct map_desc dm355_io_desc[] = {
>> +    {
>> +            .virtual        = IO_VIRT,
>> +            .pfn            = __phys_to_pfn(IO_PHYS),
>> +            .length         = IO_SIZE,
>> +            .type           = MT_DEVICE
>> +    },
>> +};
>> +
>> +static struct davinci_soc_info davinci_soc_info_dm355 = {
>> +    .io_desc                = dm355_io_desc,
>> +    .io_desc_num            = ARRAY_SIZE(dm355_io_desc),
>> +};
>> +
>> +struct davinci_soc_info *dm355_get_soc_info(void)
>> +{
>> +    return &davinci_soc_info_dm355;
>> +}
>> +
>
>    Why not just declare davinci_soc_info_dm* 'extern' instead of this  
> simplisitic function that seem to serve no real purpose?

Because I eventually want to evolve things so unused SoC data is deleted
and this "API" is conducive to that and a global isn't.  Eventually,
dmxxx_get_soc_info() will alloc the space necessary for its data, copy
the data into it and pass it back to the caller.  Meanwhile the
statically defined data will be __init_data so it will disappear.

Although, I may pass in a ptr to the soc_info that the SoC file will
fill out (while making a copy of the data).

Mark
--

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

Reply via email to