]> Pileus Git - ~andy/linux/commit
PCI: pciehp: Move Attention & Power Indicator support tests to accessors
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 16 Dec 2013 00:23:54 +0000 (17:23 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 16 Dec 2013 01:00:00 +0000 (18:00 -0700)
commitaf9ab791e34147952a8b97c998fa257d8292c5d6
treeb449d89e5635d37cc310edce104511b847547dcb
parente7b4f0d7841b188423b641cab71d20b1a05234e9
PCI: pciehp: Move Attention & Power Indicator support tests to accessors

Previously, the caller checked ATTN_LED() or PWR_LED() to see whether the
slot has indicators before setting the indicator state.  That clutters the
caller unnecessarily, so this moves the test inside the callees.  The test
may not even be necessary; per spec it should be harmless to try to turn on
a non-existent LED.  But checking first does avoid unnecessary hotplug
commands.

No functional change.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pciehp_ctrl.c
drivers/pci/hotplug/pciehp_hpc.c