Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95587
b: refs/heads/master
c: a50b6d7
h: refs/heads/master
i:
  95585: 2970758
  95583: 77130e0
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Apr 29, 2008
1 parent 14ad3fc commit 513e70f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21855d69d1e3ace3efdb8159a4a7ab1ab98a6f19
refs/heads/master: a50b6d7b8d7e1a8b13bd1be65a865b115e1190d9
38 changes: 38 additions & 0 deletions trunk/drivers/pnp/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,44 @@ struct resource *pnp_get_resource(struct pnp_dev *dev,
}
EXPORT_SYMBOL(pnp_get_resource);

static struct pnp_resource *pnp_new_resource(struct pnp_dev *dev, int type)
{
struct pnp_resource *pnp_res;
int i;

switch (type) {
case IORESOURCE_IO:
for (i = 0; i < PNP_MAX_PORT; i++) {
pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_IO, i);
if (pnp_res && !pnp_resource_valid(&pnp_res->res))
return pnp_res;
}
break;
case IORESOURCE_MEM:
for (i = 0; i < PNP_MAX_MEM; i++) {
pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_MEM, i);
if (pnp_res && !pnp_resource_valid(&pnp_res->res))
return pnp_res;
}
break;
case IORESOURCE_IRQ:
for (i = 0; i < PNP_MAX_IRQ; i++) {
pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_IRQ, i);
if (pnp_res && !pnp_resource_valid(&pnp_res->res))
return pnp_res;
}
break;
case IORESOURCE_DMA:
for (i = 0; i < PNP_MAX_DMA; i++) {
pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_DMA, i);
if (pnp_res && !pnp_resource_valid(&pnp_res->res))
return pnp_res;
}
break;
}
return NULL;
}

/* format is: pnp_reserve_irq=irq1[,irq2] .... */
static int __init pnp_setup_reserve_irq(char *str)
{
Expand Down

0 comments on commit 513e70f

Please sign in to comment.