diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 454290b..9ff76dc 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c @@ -261,7 +261,7 @@ int pnp_check_port(struct pnp_dev *dev, int idx) if (tdev == dev) continue; for (i = 0; - (tres = pnp_get_resource(dev, IORESOURCE_IO, i)); + (tres = pnp_get_resource(tdev, IORESOURCE_IO, i)); i++) { if (tres->flags & IORESOURCE_IO) { if (cannot_compare(tres->flags)) @@ -325,7 +325,7 @@ int pnp_check_mem(struct pnp_dev *dev, int idx) if (tdev == dev) continue; for (i = 0; - (tres = pnp_get_resource(dev, IORESOURCE_MEM, i)); + (tres = pnp_get_resource(tdev, IORESOURCE_MEM, i)); i++) { if (tres->flags & IORESOURCE_MEM) { if (cannot_compare(tres->flags)) @@ -408,7 +408,7 @@ int pnp_check_irq(struct pnp_dev *dev, int idx) if (tdev == dev) continue; for (i = 0; - (tres = pnp_get_resource(dev, IORESOURCE_IRQ, i)); + (tres = pnp_get_resource(tdev, IORESOURCE_IRQ, i)); i++) { if (tres->flags & IORESOURCE_IRQ) { if (cannot_compare(tres->flags)) @@ -471,7 +471,7 @@ int pnp_check_dma(struct pnp_dev *dev, int idx) if (tdev == dev) continue; for (i = 0; - (tres = pnp_get_resource(dev, IORESOURCE_DMA, i)); + (tres = pnp_get_resource(tdev, IORESOURCE_DMA, i)); i++) { if (tres->flags & IORESOURCE_DMA) { if (cannot_compare(tres->flags))