diff options
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r-- | drivers/pnp/isapnp/core.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index 752b51fbaa6..ca4457ec403 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c | |||
@@ -973,8 +973,7 @@ static int isapnp_set_resources(struct pnp_dev *dev) | |||
973 | dev->active = 1; | 973 | dev->active = 1; |
974 | for (tmp = 0; tmp < ISAPNP_MAX_PORT; tmp++) { | 974 | for (tmp = 0; tmp < ISAPNP_MAX_PORT; tmp++) { |
975 | res = pnp_get_resource(dev, IORESOURCE_IO, tmp); | 975 | res = pnp_get_resource(dev, IORESOURCE_IO, tmp); |
976 | if (res && pnp_resource_valid(res) && | 976 | if (pnp_resource_enabled(res)) { |
977 | !(res->flags & IORESOURCE_DISABLED)) { | ||
978 | dev_dbg(&dev->dev, " set io %d to %#llx\n", | 977 | dev_dbg(&dev->dev, " set io %d to %#llx\n", |
979 | tmp, (unsigned long long) res->start); | 978 | tmp, (unsigned long long) res->start); |
980 | isapnp_write_word(ISAPNP_CFG_PORT + (tmp << 1), | 979 | isapnp_write_word(ISAPNP_CFG_PORT + (tmp << 1), |
@@ -983,8 +982,7 @@ static int isapnp_set_resources(struct pnp_dev *dev) | |||
983 | } | 982 | } |
984 | for (tmp = 0; tmp < ISAPNP_MAX_IRQ; tmp++) { | 983 | for (tmp = 0; tmp < ISAPNP_MAX_IRQ; tmp++) { |
985 | res = pnp_get_resource(dev, IORESOURCE_IRQ, tmp); | 984 | res = pnp_get_resource(dev, IORESOURCE_IRQ, tmp); |
986 | if (res && pnp_resource_valid(res) && | 985 | if (pnp_resource_enabled(res)) { |
987 | !(res->flags & IORESOURCE_DISABLED)) { | ||
988 | int irq = res->start; | 986 | int irq = res->start; |
989 | if (irq == 2) | 987 | if (irq == 2) |
990 | irq = 9; | 988 | irq = 9; |
@@ -994,8 +992,7 @@ static int isapnp_set_resources(struct pnp_dev *dev) | |||
994 | } | 992 | } |
995 | for (tmp = 0; tmp < ISAPNP_MAX_DMA; tmp++) { | 993 | for (tmp = 0; tmp < ISAPNP_MAX_DMA; tmp++) { |
996 | res = pnp_get_resource(dev, IORESOURCE_DMA, tmp); | 994 | res = pnp_get_resource(dev, IORESOURCE_DMA, tmp); |
997 | if (res && pnp_resource_valid(res) && | 995 | if (pnp_resource_enabled(res)) { |
998 | !(res->flags & IORESOURCE_DISABLED)) { | ||
999 | dev_dbg(&dev->dev, " set dma %d to %lld\n", | 996 | dev_dbg(&dev->dev, " set dma %d to %lld\n", |
1000 | tmp, (unsigned long long) res->start); | 997 | tmp, (unsigned long long) res->start); |
1001 | isapnp_write_byte(ISAPNP_CFG_DMA + tmp, res->start); | 998 | isapnp_write_byte(ISAPNP_CFG_DMA + tmp, res->start); |
@@ -1003,8 +1000,7 @@ static int isapnp_set_resources(struct pnp_dev *dev) | |||
1003 | } | 1000 | } |
1004 | for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) { | 1001 | for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) { |
1005 | res = pnp_get_resource(dev, IORESOURCE_MEM, tmp); | 1002 | res = pnp_get_resource(dev, IORESOURCE_MEM, tmp); |
1006 | if (res && pnp_resource_valid(res) && | 1003 | if (pnp_resource_enabled(res)) { |
1007 | !(res->flags & IORESOURCE_DISABLED)) { | ||
1008 | dev_dbg(&dev->dev, " set mem %d to %#llx\n", | 1004 | dev_dbg(&dev->dev, " set mem %d to %#llx\n", |
1009 | tmp, (unsigned long long) res->start); | 1005 | tmp, (unsigned long long) res->start); |
1010 | isapnp_write_word(ISAPNP_CFG_MEM + (tmp << 3), | 1006 | isapnp_write_word(ISAPNP_CFG_MEM + (tmp << 3), |