Skip to content

Commit 709b41b

Browse files
bjorn-helgaasgregkh
authored andcommitted
misc: rtsx: Remove unnecessary rts5249_set_aspm(), rts5260_set_aspm()
rts5249_set_aspm() and rts5260_set_aspm() do nothing more than the default rtsx_comm_set_aspm() does, so remove them and use the default. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20200521180545.1159896-7-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 05ffe36 commit 709b41b

2 files changed

Lines changed: 0 additions & 28 deletions

File tree

‎drivers/misc/cardreader/rts5249.c‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,6 @@ static int rtsx_base_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
347347
return rtsx_pci_send_cmd(pcr, 100);
348348
}
349349

350-
static void rts5249_set_aspm(struct rtsx_pcr *pcr, bool enable)
351-
{
352-
if (pcr->aspm_enabled == enable)
353-
return;
354-
355-
pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
356-
PCI_EXP_LNKCTL_ASPMC,
357-
enable ? pcr->aspm_en : 0);
358-
359-
pcr->aspm_enabled = enable;
360-
}
361-
362350
static const struct pcr_ops rts5249_pcr_ops = {
363351
.fetch_vendor_settings = rtsx_base_fetch_vendor_settings,
364352
.extra_init_hw = rts5249_extra_init_hw,
@@ -371,7 +359,6 @@ static const struct pcr_ops rts5249_pcr_ops = {
371359
.card_power_off = rtsx_base_card_power_off,
372360
.switch_output_voltage = rtsx_base_switch_output_voltage,
373361
.force_power_down = rtsx_base_force_power_down,
374-
.set_aspm = rts5249_set_aspm,
375362
};
376363

377364
/* SD Pull Control Enable:
@@ -598,7 +585,6 @@ static const struct pcr_ops rts524a_pcr_ops = {
598585
.switch_output_voltage = rtsx_base_switch_output_voltage,
599586
.force_power_down = rtsx_base_force_power_down,
600587
.set_l1off_cfg_sub_d0 = rts5250_set_l1off_cfg_sub_d0,
601-
.set_aspm = rts5249_set_aspm,
602588
};
603589

604590
void rts524a_init_params(struct rtsx_pcr *pcr)
@@ -714,7 +700,6 @@ static const struct pcr_ops rts525a_pcr_ops = {
714700
.switch_output_voltage = rts525a_switch_output_voltage,
715701
.force_power_down = rtsx_base_force_power_down,
716702
.set_l1off_cfg_sub_d0 = rts5250_set_l1off_cfg_sub_d0,
717-
.set_aspm = rts5249_set_aspm,
718703
};
719704

720705
void rts525a_init_params(struct rtsx_pcr *pcr)

‎drivers/misc/cardreader/rts5260.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -570,18 +570,6 @@ static int rts5260_extra_init_hw(struct rtsx_pcr *pcr)
570570
return 0;
571571
}
572572

573-
static void rts5260_set_aspm(struct rtsx_pcr *pcr, bool enable)
574-
{
575-
if (pcr->aspm_enabled == enable)
576-
return;
577-
578-
pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
579-
PCI_EXP_LNKCTL_ASPMC,
580-
enable ? pcr->aspm : 0);
581-
582-
pcr->aspm_enabled = enable;
583-
}
584-
585573
static void rts5260_set_l1off_cfg_sub_d0(struct rtsx_pcr *pcr, int active)
586574
{
587575
struct rtsx_cr_option *option = &pcr->option;
@@ -627,7 +615,6 @@ static const struct pcr_ops rts5260_pcr_ops = {
627615
.switch_output_voltage = rts5260_switch_output_voltage,
628616
.force_power_down = rtsx_base_force_power_down,
629617
.stop_cmd = rts5260_stop_cmd,
630-
.set_aspm = rts5260_set_aspm,
631618
.set_l1off_cfg_sub_d0 = rts5260_set_l1off_cfg_sub_d0,
632619
.enable_ocp = rts5260_enable_ocp,
633620
.disable_ocp = rts5260_disable_ocp,

0 commit comments

Comments
 (0)