[PATCH v3 10/14] omap: mailbox: reorganize registering

Felipe Contreras felipe.contreras at gmail.com
Mon May 24 15:17:29 EDT 2010


On Mon, May 24, 2010 at 9:32 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Mon, May 24, 2010 at 06:24:07PM +0300, Hiroshi DOYU wrote:
>> From: ext Felipe Contreras <felipe.contreras at gmail.com>
>> Subject: [PATCH v3 10/14] omap: mailbox: reorganize registering
>> Date: Sat, 22 May 2010 19:14:21 +0200
>>
>> > platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> > -   if (unlikely(!res)) {
>> > -           dev_err(&pdev->dev, "invalid mem resource\n");
>> > -           return -ENODEV;
>> > -   }
>> > +   res = pdev->resource;
>>
>> why not?
>>
>>       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>
> I agree - always use the accessors provided rather than going beneath
> the covers and fiddling directly with stuff inside objects.

Yes, this patch slipped from the previous series where resources were
defined in the same file and some tricky assumptions were being made.
Now platform_get_resource() makes more sense.

-- 
Felipe Contreras



More information about the linux-arm-kernel mailing list