Skip to content

Commit

Permalink
ACPI / power: Remove useless message from device registering routine
Browse files Browse the repository at this point in the history
After commit 71fbad6 (PCI/ACPI: Notify PCI devices when their power
resource is turned on) made acpi_pci_bind() call
acpi_power_resource_register_device(), the debug message at the end
of the latter appears in the kernel log for every PCI device that
doesn't happen to have power resources assigned (which is the vast
majority of them).  However, this message is totally useless, because
it doesn't even say which device it is about.  Moreover, it is
misleading, because it only means that the given device has no power
resources, which isn't exceptional at all.

Remove that useless message altogether and simplify
acpi_power_resource_register_device() slightly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Jan 3, 2013
1 parent 23415eb commit 0271f4f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions drivers/acpi/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,8 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle)
return -ENODEV;

ret = acpi_bus_get_device(handle, &acpi_dev);
if (ret)
goto no_power_resource;

if (!acpi_dev->power.flags.power_resources)
goto no_power_resource;
if (ret || !acpi_dev->power.flags.power_resources)
return -ENODEV;

powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL);
if (!powered_device)
Expand All @@ -471,10 +468,6 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle)
}

return ret;

no_power_resource:
printk(KERN_DEBUG PREFIX "Invalid Power Resource to register!\n");
return -ENODEV;
}
EXPORT_SYMBOL_GPL(acpi_power_resource_register_device);

Expand Down

0 comments on commit 0271f4f

Please sign in to comment.