diff options
Diffstat (limited to 'drivers/pnp/pnpacpi/core.c')
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 53561d72b4e..383e47c392a 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -75,7 +75,7 @@ static int __init ispnpidacpi(char *id) | |||
75 | 75 | ||
76 | static int pnpacpi_get_resources(struct pnp_dev *dev) | 76 | static int pnpacpi_get_resources(struct pnp_dev *dev) |
77 | { | 77 | { |
78 | dev_dbg(&dev->dev, "get resources\n"); | 78 | pnp_dbg(&dev->dev, "get resources\n"); |
79 | return pnpacpi_parse_allocated_resource(dev); | 79 | return pnpacpi_parse_allocated_resource(dev); |
80 | } | 80 | } |
81 | 81 | ||
@@ -86,7 +86,7 @@ static int pnpacpi_set_resources(struct pnp_dev *dev) | |||
86 | int ret; | 86 | int ret; |
87 | acpi_status status; | 87 | acpi_status status; |
88 | 88 | ||
89 | dev_dbg(&dev->dev, "set resources\n"); | 89 | pnp_dbg(&dev->dev, "set resources\n"); |
90 | ret = pnpacpi_build_resource_template(dev, &buffer); | 90 | ret = pnpacpi_build_resource_template(dev, &buffer); |
91 | if (ret) | 91 | if (ret) |
92 | return ret; | 92 | return ret; |
@@ -148,9 +148,13 @@ static int __init pnpacpi_add_device(struct acpi_device *device) | |||
148 | acpi_status status; | 148 | acpi_status status; |
149 | struct pnp_dev *dev; | 149 | struct pnp_dev *dev; |
150 | 150 | ||
151 | /* | ||
152 | * If a PnPacpi device is not present , the device | ||
153 | * driver should not be loaded. | ||
154 | */ | ||
151 | status = acpi_get_handle(device->handle, "_CRS", &temp); | 155 | status = acpi_get_handle(device->handle, "_CRS", &temp); |
152 | if (ACPI_FAILURE(status) || !ispnpidacpi(acpi_device_hid(device)) || | 156 | if (ACPI_FAILURE(status) || !ispnpidacpi(acpi_device_hid(device)) || |
153 | is_exclusive_device(device)) | 157 | is_exclusive_device(device) || (!device->status.present)) |
154 | return 0; | 158 | return 0; |
155 | 159 | ||
156 | dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device)); | 160 | dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device)); |
@@ -255,14 +259,14 @@ int pnpacpi_disabled __initdata; | |||
255 | static int __init pnpacpi_init(void) | 259 | static int __init pnpacpi_init(void) |
256 | { | 260 | { |
257 | if (acpi_disabled || pnpacpi_disabled) { | 261 | if (acpi_disabled || pnpacpi_disabled) { |
258 | pnp_info("PnP ACPI: disabled"); | 262 | printk(KERN_INFO "pnp: PnP ACPI: disabled\n"); |
259 | return 0; | 263 | return 0; |
260 | } | 264 | } |
261 | pnp_info("PnP ACPI init"); | 265 | printk(KERN_INFO "pnp: PnP ACPI init\n"); |
262 | pnp_register_protocol(&pnpacpi_protocol); | 266 | pnp_register_protocol(&pnpacpi_protocol); |
263 | register_acpi_bus_type(&acpi_pnp_bus); | 267 | register_acpi_bus_type(&acpi_pnp_bus); |
264 | acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL); | 268 | acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL); |
265 | pnp_info("PnP ACPI: found %d devices", num); | 269 | printk(KERN_INFO "pnp: PnP ACPI: found %d devices\n", num); |
266 | unregister_acpi_bus_type(&acpi_pnp_bus); | 270 | unregister_acpi_bus_type(&acpi_pnp_bus); |
267 | pnp_platform_devices = 1; | 271 | pnp_platform_devices = 1; |
268 | return 0; | 272 | return 0; |