diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-10-12 12:10:12 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-10-21 13:55:37 -0500 |
commit | bee67756eb4ae51ededeb8ce56e7f4fb91d30b43 (patch) | |
tree | 678a5fc78d9959f5398004e9e3f048e130868edc /drivers/pci/pci.c | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) | |
download | linux-stable-bee67756eb4ae51ededeb8ce56e7f4fb91d30b43.tar.gz linux-stable-bee67756eb4ae51ededeb8ce56e7f4fb91d30b43.tar.bz2 linux-stable-bee67756eb4ae51ededeb8ce56e7f4fb91d30b43.zip |
PCI: pciehp: Queue power work requests in dedicated function
Up to now, work items to be queued to be handled by pciehp_power_thread()
are allocated using kmalloc() in three different locations. If not needed,
kfree() is called to free the allocated data.
Introduce a separate function to allocate the work item and queue it, and
call it only if needed. This reduces code duplication and avoids having to
free memory if the work item does not need to get executed.
[bhelgaas: tweak "no memory" message, make pciehp_queue_power_work() static]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.c')
0 files changed, 0 insertions, 0 deletions