summaryrefslogtreecommitdiff
path: root/drivers/pnp/pnpbios
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-29 02:34:24 +0400
committerLen Brown <len.brown@intel.com>2008-04-29 11:22:26 +0400
commit7e2cf31f1c97ac14b6d9dc5f1ce9e1e01aef9c18 (patch)
treea69361060c5bd7a2d4ca6f8d91ff09248d7dee7b /drivers/pnp/pnpbios
parentbe81b4a4838ce329b9f3978c7fc007b047c23722 (diff)
downloadlinux-7e2cf31f1c97ac14b6d9dc5f1ce9e1e01aef9c18.tar.xz
PNP: convert encoders to use pnp_get_resource(), not pnp_resource_table
This removes more direct references to pnp_resource_table. This path is used when telling a device what resources it should use. This doesn't convert ISAPNP because ISA needs to know the config register index in addition to the resource itself. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-By: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/pnpbios')
-rw-r--r--drivers/pnp/pnpbios/rsparser.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index 4390e3b41df0..c1f9e162d2c5 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -688,7 +688,6 @@ static unsigned char *pnpbios_encode_allocated_resource_data(struct pnp_dev
unsigned char *p,
unsigned char *end)
{
- struct pnp_resource_table *res = &dev->res;
unsigned int len, tag;
int port = 0, irq = 0, dma = 0, mem = 0;
@@ -711,42 +710,48 @@ static unsigned char *pnpbios_encode_allocated_resource_data(struct pnp_dev
case LARGE_TAG_MEM:
if (len != 9)
goto len_err;
- pnpbios_encode_mem(dev, p, &res->mem_resource[mem]);
+ pnpbios_encode_mem(dev, p,
+ pnp_get_resource(dev, IORESOURCE_MEM, mem));
mem++;
break;
case LARGE_TAG_MEM32:
if (len != 17)
goto len_err;
- pnpbios_encode_mem32(dev, p, &res->mem_resource[mem]);
+ pnpbios_encode_mem32(dev, p,
+ pnp_get_resource(dev, IORESOURCE_MEM, mem));
mem++;
break;
case LARGE_TAG_FIXEDMEM32:
if (len != 9)
goto len_err;
- pnpbios_encode_fixed_mem32(dev, p, &res->mem_resource[mem]);
+ pnpbios_encode_fixed_mem32(dev, p,
+ pnp_get_resource(dev, IORESOURCE_MEM, mem));
mem++;
break;
case SMALL_TAG_IRQ:
if (len < 2 || len > 3)
goto len_err;
- pnpbios_encode_irq(dev, p, &res->irq_resource[irq]);
+ pnpbios_encode_irq(dev, p,
+ pnp_get_resource(dev, IORESOURCE_IRQ, irq));
irq++;
break;
case SMALL_TAG_DMA:
if (len != 2)
goto len_err;
- pnpbios_encode_dma(dev, p, &res->dma_resource[dma]);
+ pnpbios_encode_dma(dev, p,
+ pnp_get_resource(dev, IORESOURCE_DMA, dma));
dma++;
break;
case SMALL_TAG_PORT:
if (len != 7)
goto len_err;
- pnpbios_encode_port(dev, p, &res->port_resource[port]);
+ pnpbios_encode_port(dev, p,
+ pnp_get_resource(dev, IORESOURCE_IO, port));
port++;
break;
@@ -757,7 +762,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(struct pnp_dev
case SMALL_TAG_FIXEDPORT:
if (len != 3)
goto len_err;
- pnpbios_encode_fixed_port(dev, p, &res->port_resource[port]);
+ pnpbios_encode_fixed_port(dev, p,
+ pnp_get_resource(dev, IORESOURCE_IO, port));
port++;
break;