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

Russell King - ARM Linux linux at arm.linux.org.uk
Mon May 24 14:32:49 EDT 2010


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.



More information about the linux-arm-kernel mailing list