Skip to contentSkip to conversation

staging: rts5208: Remove wrapper function

PATCH In review Amitoj Kaur Chawla 2 participants 2 messages Oct 29, 2015 – Nov 4, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rts5208: Remove wrapper function

Drop wrapper function that can be replaced by a single line of code.

---
 drivers/staging/rts5208/rtsx_chip.c | 9 ++-------
 drivers/staging/rts5208/rtsx_chip.h | 1 -
 drivers/staging/rts5208/rtsx_scsi.c | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/staging/rts5208/rtsx_chip.c +2 -7
index c0ce659..ca9f021 100644
@@ -109,11 +109,6 @@ void rtsx_enable_bus_int(struct rtsx_chip *chip)
 	dev_dbg(rtsx_dev(chip), "RTSX_BIER: 0x%08x\n", reg);
 }
 
-void rtsx_disable_bus_int(struct rtsx_chip *chip)
-{
-	rtsx_writel(chip, RTSX_BIER, 0);
-}
-
 static int rtsx_pre_handle_sdio_old(struct rtsx_chip *chip)
 {
 	int retval;
@@ -359,7 +354,7 @@ static int rtsx_enable_pcie_intr(struct rtsx_chip *chip)
 			rtsx_trace(chip);
 			return ret;
 		}
-		rtsx_disable_bus_int(chip);
+		rtsx_writel(chip, RTSX_BIER, 0);
 	} else {
 		rtsx_enable_bus_int(chip);
 	}
@@ -2217,7 +2212,7 @@ void rtsx_do_before_power_down(struct rtsx_chip *chip, int pm_stat)
 		return;
 
 	rtsx_release_cards(chip);
-	rtsx_disable_bus_int(chip);
+	rtsx_writel(chip, RTSX_BIER, 0);
 	turn_off_led(chip, LED_GPIO);
 
 #ifdef HW_AUTO_SWITCH_SD_BUS
drivers/staging/rts5208/rtsx_chip.h +0 -1
index c295b1e..2d6d6b8 100644
@@ -953,7 +953,6 @@ int rtsx_force_power_down(struct rtsx_chip *chip, u8 ctl);
 void rtsx_disable_card_int(struct rtsx_chip *chip);
 void rtsx_enable_card_int(struct rtsx_chip *chip);
 void rtsx_enable_bus_int(struct rtsx_chip *chip);
-void rtsx_disable_bus_int(struct rtsx_chip *chip);
 int rtsx_reset_chip(struct rtsx_chip *chip);
 int rtsx_init_chip(struct rtsx_chip *chip);
 void rtsx_release_chip(struct rtsx_chip *chip);
drivers/staging/rts5208/rtsx_scsi.c +1 -1
index 60871f3..ec8a1b0 100644
@@ -1822,7 +1822,7 @@ static int set_chip_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip)
 			return TRANSPORT_FAILED;
 		}
 
-		rtsx_disable_bus_int(chip);
+		rtsx_writel(chip, RTSX_BIER, 0);
 
 		retval = rtsx_read_phy_register(chip, 0x1C, &reg);
 		if (retval != STATUS_SUCCESS) {
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 14 lines · Amitoj Kaur Chawla

Drop wrapper function that can be replaced by a single line of code.

---
 drivers/staging/rts5208/rtsx_chip.c | 9 ++-------
 drivers/staging/rts5208/rtsx_chip.h | 1 -
 drivers/staging/rts5208/rtsx_scsi.c | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/staging/rts5208/rtsx_chip.c +0 -0
index c0ce659..ca9f021 100644

drivers/staging/rts5208/rtsx_chip.c void rtsx_enable_bus_int(struct rtsx_chip *chip) · line 115

Quoted 7 lines
drivers/staging/rts5208/rtsx_chip.c +0 -4
@@ -109,11 +109,6 @@ void rtsx_enable_bus_int(struct rtsx_chip *chip)
 	dev_dbg(rtsx_dev(chip), "RTSX_BIER: 0x%08x\n", reg);
 }
 
-void rtsx_disable_bus_int(struct rtsx_chip *chip)
-{
-	rtsx_writel(chip, RTSX_BIER, 0);
-}

This is a "useful" function in that it does a specific thing, and makes the code easier to read, so please don't remove it.

thanks,

greg k-h