Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework

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

 



On Fri, Feb 25, 2011 at 6:20 PM, Krishnamoorthy, Balaji T
<balajitk@xxxxxx> wrote:
> <snip>
>
>> -               if (cpu_is_omap44xx())
>> -                       mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
>> -               else
>> -                       mmc->reg_offset = 0;
>> +static struct omap_mmc_platform_data *mmc __initdata;
>
> can you pass this *mmc as another argument to omap_hsmmc_pdata_init
> so that this static initdata can be removed ?

Agree, will go with as said

>
>>
>> -               mmc->get_context_loss_count = hsmmc_get_context_loss;
>> +static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c)
>> +{
>> +               char *hc_name;
>>
>> -               mmc->slots[0].switch_pin = c->gpio_cd;
>> -               mmc->slots[0].gpio_wp = c->gpio_wp;
>> +       if (!c->mmc) {
>> +               pr_debug("MMC%d: no such controller\n", c->mmc);
>> +               return -ENXIO;
>> +       }
>>
>> -               mmc->slots[0].remux = c->remux;
>> -               mmc->slots[0].init_card = c->init_card;
>> +       hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL);
>> +       if (!hc_name) {
>> +               pr_err("Cannot allocate memory for controller slot name\n");
>> +               kfree(hc_name);
>> +               return -ENOMEM;
>> +       }
>>
>> -               if (c->cover_only)
>> -                       mmc->slots[0].cover = 1;
>> +       if (c->name)
>> +               strncpy(hc_name, c->name, HSMMC_NAME_LEN);
>> +       else
>> +               snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i",
>> +                                                               c->mmc, 1);
>> +       mmc->slots[0].name = hc_name;
>> +       mmc->nr_slots = 1;
>
> <snip>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux