Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: rtsx: Remove deadcode

The last uses of rtsx_ms_power_off_card3v3() and
rtsx_sd_power_off_card3v3() were removed by 2019's
commit bede03a579b3 ("misc: rtsx: Enable OCP for rts522a rts524a rts525a
rts5260")

The last use of rtsx_pci_transfer_data() was removed by 2024's
commit d0f459259c13 ("memstick: rtsx_pci_ms: Remove Realtek PCI memstick
driver")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250420145739.58337-1-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
dbc8c84d 2a87a55f

-50
-46
drivers/misc/cardreader/rtsx_pcr.c
··· 420 420 pcr->sgi++; 421 421 } 422 422 423 - int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, 424 - int num_sg, bool read, int timeout) 425 - { 426 - int err = 0, count; 427 - 428 - pcr_dbg(pcr, "--> %s: num_sg = %d\n", __func__, num_sg); 429 - count = rtsx_pci_dma_map_sg(pcr, sglist, num_sg, read); 430 - if (count < 1) 431 - return -EINVAL; 432 - pcr_dbg(pcr, "DMA mapping count: %d\n", count); 433 - 434 - err = rtsx_pci_dma_transfer(pcr, sglist, count, read, timeout); 435 - 436 - rtsx_pci_dma_unmap_sg(pcr, sglist, num_sg, read); 437 - 438 - return err; 439 - } 440 - EXPORT_SYMBOL_GPL(rtsx_pci_transfer_data); 441 - 442 423 int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, 443 424 int num_sg, bool read) 444 425 { ··· 1176 1195 rtsx_pci_write_register(pcr, REG_CFG_VCM_ON_TIMER, 0xFF, 0x03); 1177 1196 rtsx_pci_write_register(pcr, REG_CFG_OOBS_POLLING, 0xFF, 0x00); 1178 1197 1179 - } 1180 - 1181 - int rtsx_sd_power_off_card3v3(struct rtsx_pcr *pcr) 1182 - { 1183 - rtsx_pci_write_register(pcr, CARD_CLK_EN, SD_CLK_EN | 1184 - MS_CLK_EN | SD40_CLK_EN, 0); 1185 - rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, 0); 1186 - rtsx_pci_card_power_off(pcr, RTSX_SD_CARD); 1187 - 1188 - msleep(50); 1189 - 1190 - rtsx_pci_card_pull_ctl_disable(pcr, RTSX_SD_CARD); 1191 - 1192 - return 0; 1193 - } 1194 - 1195 - int rtsx_ms_power_off_card3v3(struct rtsx_pcr *pcr) 1196 - { 1197 - rtsx_pci_write_register(pcr, CARD_CLK_EN, SD_CLK_EN | 1198 - MS_CLK_EN | SD40_CLK_EN, 0); 1199 - 1200 - rtsx_pci_card_pull_ctl_disable(pcr, RTSX_MS_CARD); 1201 - 1202 - rtsx_pci_write_register(pcr, CARD_OE, MS_OUTPUT_EN, 0); 1203 - rtsx_pci_card_power_off(pcr, RTSX_MS_CARD); 1204 - 1205 - return 0; 1206 1198 } 1207 1199 1208 1200 static int rtsx_pci_init_hw(struct rtsx_pcr *pcr)
-2
drivers/misc/cardreader/rtsx_pcr.h
··· 127 127 void rtsx_pci_clear_ocpstat(struct rtsx_pcr *pcr); 128 128 void rtsx_pci_enable_oobs_polling(struct rtsx_pcr *pcr); 129 129 void rtsx_pci_disable_oobs_polling(struct rtsx_pcr *pcr); 130 - int rtsx_sd_power_off_card3v3(struct rtsx_pcr *pcr); 131 - int rtsx_ms_power_off_card3v3(struct rtsx_pcr *pcr); 132 130 133 131 #endif
-2
include/linux/rtsx_pci.h
··· 1312 1312 u8 cmd_type, u16 reg_addr, u8 mask, u8 data); 1313 1313 void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr); 1314 1314 int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); 1315 - int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, 1316 - int num_sg, bool read, int timeout); 1317 1315 int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, 1318 1316 int num_sg, bool read); 1319 1317 void rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,