Re: [PATCH 07/12] ARM: OMAP3: mmc-twl4030 add MMC3 support

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

 



On Sun, Mar 15, 2009 at 6:04 PM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Mar 10, 2009 at 02:10:00PM -0700, Tony Lindgren wrote:
>> ... Array size for hsmmc[] is specified
>> because hsmmc[2].name is needed for MMC3 name.
>
> I see nothing in this patch which requires that.

Right, but there is already some code in twl4030_mmc_init() of mmc-twl4030.c:

  struct twl_mmc_controller *twl = hsmmc + c->mmc - 1;
<snip>
  sprintf(twl->name, "mmc%islot%i", c->mmc, 1);

.. which basically writes to hsmmc[2].name for MMC3.

>> diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
>> index 6399874..042035c 100644
>> --- a/arch/arm/mach-omap2/mmc-twl4030.c
>> +++ b/arch/arm/mach-omap2/mmc-twl4030.c
>> @@ -62,7 +62,7 @@ static struct twl_mmc_controller {
>>       u8              twl_vmmc_dev_grp;
>>       u8              twl_mmc_dedicated;
>>       char            name[HSMMC_NAME_LEN + 1];
>> -} hsmmc[] = {
>> +} hsmmc[OMAP34XX_NR_MMC] = {
>
> so this change looks like it can be omitted.

No, that would bring some painful memory corruption issues.
--
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