Re: [patch 26/54] PNP: factor pnp_init_resource_table() and pnp_clean_resource_table()
- From: Rene Herman <rene.herman@xxxxxxxxxxxx>
- Date: Sat, 26 Apr 2008 23:33:16 +0200
On 25-04-08 20:38, Bjorn Helgaas wrote:
void pnp_init_resources(struct pnp_dev *dev)
{
- struct pnp_resource_table *table = &dev->res;
+ struct resource *res;
int idx;
for (idx = 0; idx < PNP_MAX_IRQ; idx++) {
- table->irq_resource[idx].name = NULL;
- table->irq_resource[idx].start = -1;
- table->irq_resource[idx].end = -1;
- table->irq_resource[idx].flags =
- IORESOURCE_IRQ | IORESOURCE_AUTO | IORESOURCE_UNSET;
+ res = &dev->res.irq_resource[idx];
+ res->flags = IORESOURCE_IRQ;
ACK as commented earlier but pnp_clean_resource_table would seem to want the same treatment of setting the type, at least to again guarantee current behaviour:
static void pnp_clean_resource_table(struct pnp_dev *dev)
{
- struct pnp_resource_table *res = &dev->res;
+ struct resource *res;
int idx;
for (idx = 0; idx < PNP_MAX_IRQ; idx++) {
- if (!(res->irq_resource[idx].flags & IORESOURCE_AUTO))
- continue;
- res->irq_resource[idx].start = -1;
- res->irq_resource[idx].end = -1;
- res->irq_resource[idx].flags =
- IORESOURCE_IRQ | IORESOURCE_AUTO | IORESOURCE_UNSET;
+ res = &dev->res.irq_resource[idx];
+ if (res->flags & IORESOURCE_AUTO)
+ pnp_init_resource(res);
}
Rene.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [patch 00/54] PNP cleanup, v4
- From: Bjorn Helgaas
- [patch 26/54] PNP: factor pnp_init_resource_table() and pnp_clean_resource_table()
- From: Bjorn Helgaas
- [patch 00/54] PNP cleanup, v4
- Prev by Date: OQO o2 extras driver, testers needed
- Next by Date: Re: spinlock lockup on CPU#0
- Previous by thread: [patch 26/54] PNP: factor pnp_init_resource_table() and pnp_clean_resource_table()
- Next by thread: Re: [patch 26/54] PNP: factor pnp_init_resource_table() and pnp_clean_resource_table()
- Index(es):
Relevant Pages
|