diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/resource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 782e82289571..f980ff7166e9 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -179,8 +179,9 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res) | |||
179 | /* check if the resource is already in use, skip if the | 179 | /* check if the resource is already in use, skip if the |
180 | * device is active because it itself may be in use */ | 180 | * device is active because it itself may be in use */ |
181 | if (!dev->active) { | 181 | if (!dev->active) { |
182 | if (__check_region(&ioport_resource, *port, length(port, end))) | 182 | if (!request_region(*port, length(port, end), "pnp")) |
183 | return 0; | 183 | return 0; |
184 | release_region(*port, length(port, end)); | ||
184 | } | 185 | } |
185 | 186 | ||
186 | /* check if the resource is reserved */ | 187 | /* check if the resource is reserved */ |
@@ -241,8 +242,9 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res) | |||
241 | /* check if the resource is already in use, skip if the | 242 | /* check if the resource is already in use, skip if the |
242 | * device is active because it itself may be in use */ | 243 | * device is active because it itself may be in use */ |
243 | if (!dev->active) { | 244 | if (!dev->active) { |
244 | if (check_mem_region(*addr, length(addr, end))) | 245 | if (!request_mem_region(*addr, length(addr, end), "pnp")) |
245 | return 0; | 246 | return 0; |
247 | release_mem_region(*addr, length(addr, end)); | ||
246 | } | 248 | } |
247 | 249 | ||
248 | /* check if the resource is reserved */ | 250 | /* check if the resource is reserved */ |