summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2020-05-21 13:05:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-22 09:38:13 +0200
commit05ffe36a092935bf50d573842ce62c9ad9893005 (patch)
tree54ebf48a5bc93e783d02eb148d4bef2c9c6f89ab /drivers/misc
parent3d1e7aa80d1c0e7ce8313f21c1e9c14a12d3ba48 (diff)
downloadlinux-05ffe36a092935bf50d573842ce62c9ad9893005.tar.bz2
misc: rtsx: Simplify rtsx_comm_set_aspm()
Simplify rtsx_comm_set_aspm() and remove the now-unused rtsx_pci_enable_aspm(). rtsx_pci_disable_aspm() is still used by rtsx_pci_init_hw(). Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20200521180545.1159896-6-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/cardreader/rtsx_pcr.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index a8ce9c3744be..aea4b5d85e9c 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -55,12 +55,6 @@ static const struct pci_device_id rtsx_pci_ids[] = {
MODULE_DEVICE_TABLE(pci, rtsx_pci_ids);
-static inline void rtsx_pci_enable_aspm(struct rtsx_pcr *pcr)
-{
- pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
- PCI_EXP_LNKCTL_ASPMC, pcr->aspm_en);
-}
-
static inline void rtsx_pci_disable_aspm(struct rtsx_pcr *pcr)
{
pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
@@ -93,10 +87,9 @@ static void rtsx_comm_set_aspm(struct rtsx_pcr *pcr, bool enable)
if (pcr->aspm_enabled == enable)
return;
- if (enable)
- rtsx_pci_enable_aspm(pcr);
- else
- rtsx_pci_disable_aspm(pcr);
+ pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
+ PCI_EXP_LNKCTL_ASPMC,
+ enable ? pcr->aspm_en : 0);
pcr->aspm_enabled = enable;
}