On 02/02/13 13:40, Gabor Juhos wrote:
+static int ar724x_pci_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ int irq;
+
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl_base");
+ if (!res)
+ return -EINVAL;
+
+ ar724x_pci_ctrl_base = devm_request_and_ioremap(&pdev->dev, res);
+ if (ar724x_pci_ctrl_base == NULL)
+ return -EBUSY;
+
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base");
+ if (!res)
+ return -EINVAL;
Hi,
maybe better use platform_get_resource(pdev, IORESOURCE_MEM, 0/1) ...
you will otherwise have to patch this again when you convert to OF
John