No subject
Fri Oct 22 17:57:35 EDT 2010
is added so that Driver's can avoid doing ioremap.
check Santosh's comment on this API
http://www.spinics.net/lists/arm-kernel/msg92260.html
>
> static int __devinit =A0dev_probe (*pdev) {
> =A0 struct resource *res;
> =A0 void __iomem *base;
> =A0 u16 irq;
> =A0 ....
> =A0 ....
> =A0 res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0);
> =A0 if (unlikely(!res)) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0....
> =A0 =A0 =A0 =A0 =A0 =A0 =A0return -ENODEV;
> =A0 }
>
> =A0 base =3D ioremap(res->start, resource_size(res));
> =A0 if (base) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ....
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENOMEM;
> =A0 }
>
> =A0 res =3D platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> =A0 if (unlikely(!res)) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ....
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
> =A0 }
> =A0 irq =3D res->start;
> =A0 ....
> =A0 ....
> }
>
> -V Charulatha
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>
More information about the linux-arm-kernel
mailing list