diff options
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r-- | drivers/pnp/isapnp/core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index 2e5e58c777dd..bdd8508090da 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c | |||
@@ -941,11 +941,9 @@ static int isapnp_read_resources(struct pnp_dev *dev) | |||
941 | ret = isapnp_read_word(ISAPNP_CFG_PORT + (tmp << 1)); | 941 | ret = isapnp_read_word(ISAPNP_CFG_PORT + (tmp << 1)); |
942 | if (!ret) | 942 | if (!ret) |
943 | continue; | 943 | continue; |
944 | pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_IO, tmp); | 944 | pnp_res = pnp_add_io_resource(dev, ret, ret, 0); |
945 | pnp_res->index = tmp; | 945 | if (pnp_res) |
946 | res = &pnp_res->res; | 946 | pnp_res->index = tmp; |
947 | res->start = ret; | ||
948 | res->flags = IORESOURCE_IO; | ||
949 | } | 947 | } |
950 | for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) { | 948 | for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) { |
951 | ret = | 949 | ret = |