staging: rts5208: Remove function soft_reset_sd_card() [Linux 5.3]

This Linux kernel change "staging: rts5208: Remove function soft_reset_sd_card()" is included in the Linux 5.3 release. This change is authored by Nishka Dasgupta <nishkadg.linux [at] gmail.com> on Wed Jun 19 13:02:01 2019 +0530. The commit for this change in Linux stable tree is e5dc970 (patch).

staging: rts5208: Remove function soft_reset_sd_card()

Remove function soft_reset_sd_card, as all it does is call reset_sd.
Modify call sites of the former to call the latter instead.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

There are 8 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/rts5208/sd.c | 7 +------
 drivers/staging/rts5208/sd.h | 1 -
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index c256a23..b3f829e 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -3580,11 +3580,6 @@ int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector,
 }

 #ifdef SUPPORT_CPRM
-int soft_reset_sd_card(struct rtsx_chip *chip)
-{
-   return reset_sd(chip);
-}
-
 int ext_sd_send_cmd_get_rsp(struct rtsx_chip *chip, u8 cmd_idx, u32 arg,
                u8 rsp_type, u8 *rsp, int rsp_len,
                bool special_check)
@@ -4639,7 +4634,7 @@ int sd_hw_rst(struct scsi_cmnd *srb, struct rtsx_chip *chip)
        break;

    case 1:
-       retval = soft_reset_sd_card(chip);
+       retval = reset_sd(chip);
        if (retval != STATUS_SUCCESS) {
            set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT);
            sd_card->pre_cmd_err = 1;
diff --git a/drivers/staging/rts5208/sd.h b/drivers/staging/rts5208/sd.h
index e124526..dc9e8ca 100644
--- a/drivers/staging/rts5208/sd.h
+++ b/drivers/staging/rts5208/sd.h
@@ -273,7 +273,6 @@ int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
 int sd_power_off_card3v3(struct rtsx_chip *chip);
 int release_sd_card(struct rtsx_chip *chip);
 #ifdef SUPPORT_CPRM
-int soft_reset_sd_card(struct rtsx_chip *chip);
 int ext_sd_send_cmd_get_rsp(struct rtsx_chip *chip, u8 cmd_idx,
                u32 arg, u8 rsp_type, u8 *rsp, int rsp_len,
                bool special_check);

Leave a Reply

Your email address will not be published. Required fields are marked *