On 12.10.2012 16:56, Balaji T K wrote:
> On Friday 12 October 2012 07:59 PM, Daniel Mack wrote:
>> On 12.10.2012 12:58, Daniel Mack wrote:
>>> When probed from DT, the self-allocated platform data has to be attached
>>> to the actual device. Otherwise a NULL pointer will be dereferenced from
>>> omap_hsmmc_card_detect if a gpio handle for card-detect has been passed.
>>>
>>> Signed-off-by: Daniel Mack <[email protected]>
>>> Cc: Venkatraman S <[email protected]>
>>> Cc: Chris Ball <[email protected]>
>>> Cc: Grant Likely <[email protected]>
>>> Cc: Rob Herring <[email protected]>
>>> Cc: [email protected]
>>> ---
>>>   drivers/mmc/host/omap_hsmmc.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>>> index 19ccb59..4b70823 100644
>>> --- a/drivers/mmc/host/omap_hsmmc.c
>>> +++ b/drivers/mmc/host/omap_hsmmc.c
>>> @@ -1728,6 +1728,7 @@ static int __devinit omap_hsmmc_probe(struct 
>>> platform_device *pdev)
>>>                     const u16 *offsetp = match->data;
>>>                     pdata->reg_offset = *offsetp;
>>>             }
>>> +           pdev->dev.platform_data = pdata;
>>>     }
>>>
>>>     if (pdata == NULL) {
>>>
>>
>> FWIW, this is the Oops I see without this patch:
> Hi,
> Shouldn't pdev->dev.platform_data be set to NULL on _remove ?

Why?

> BTW, I posted a patch for the same by accessing saved version from 
> host->pdata
> http://permalink.gmane.org/gmane.linux.kernel.mmc/16996

Ok, that's another solution. I thought about this too, but then chose
the easier way :) I don't care which patch is taken, as long as we have
a fix in mainline.


Thanks,
Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to