Add static modifier before some functions and global variables.
Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#ifdef SUPPORT_MAGIC_GATE
#ifdef READ_BYTES_WAIT_INT
-int ms_poll_int(struct rtsx_chip *chip)
+static int ms_poll_int(struct rtsx_chip *chip)
{
int retval;
u8 val;
* this defines our host template, with which we'll allocate hosts
*/
-struct scsi_host_template rtsx_host_template = {
+static struct scsi_host_template rtsx_host_template = {
/* basic userland interface stuff */
.name = CR_DRIVER_NAME,
.proc_name = CR_DRIVER_NAME,
}
#endif /* CONFIG_PM */
-void rtsx_shutdown(struct pci_dev *pci)
+static void rtsx_shutdown(struct pci_dev *pci)
{
struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
struct rtsx_chip *chip;
}
}
-void release_sdio(struct rtsx_chip *chip)
+static void release_sdio(struct rtsx_chip *chip)
{
if (chip->sd_io) {
rtsx_write_register(chip, CARD_STOP, SD_STOP | SD_CLR_ERR,
return !fake_para;
}
-int rts5209_init(struct rtsx_chip *chip)
+static int rts5209_init(struct rtsx_chip *chip)
{
int retval;
u32 lval = 0;
return STATUS_SUCCESS;
}
-int rts5208_init(struct rtsx_chip *chip)
+static int rts5208_init(struct rtsx_chip *chip)
{
int retval;
u16 reg = 0;
return STATUS_SUCCESS;
}
-int rts5288_init(struct rtsx_chip *chip)
+static int rts5288_init(struct rtsx_chip *chip)
{
int retval;
u8 val = 0, max_func;
}
#endif
-void rtsx_monitor_aspm_config(struct rtsx_chip *chip)
+static void rtsx_monitor_aspm_config(struct rtsx_chip *chip)
{
int maybe_support_aspm, reg_changed;
u32 tmp = 0;
return TRANSPORT_GOOD;
}
-unsigned char formatter_inquiry_str[20] = {
+static unsigned char formatter_inquiry_str[20] = {
'M', 'E', 'M', 'O', 'R', 'Y', 'S', 'T', 'I', 'C', 'K',
#ifdef SUPPORT_MAGIC_GATE
'-', 'M', 'G', /* Byte[47:49] */
}
#ifdef SUPPORT_PCGL_1P18
-int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip)
+static int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip)
{
struct ms_info *ms_card = &(chip->ms_card);
unsigned int lun = SCSI_LUN(srb);
#endif
#ifdef SUPPORT_MAGIC_GATE
-int mg_report_key(struct scsi_cmnd *srb, struct rtsx_chip *chip)
+static int mg_report_key(struct scsi_cmnd *srb, struct rtsx_chip *chip)
{
struct ms_info *ms_card = &(chip->ms_card);
unsigned int lun = SCSI_LUN(srb);
return TRANSPORT_GOOD;
}
-int mg_send_key(struct scsi_cmnd *srb, struct rtsx_chip *chip)
+static int mg_send_key(struct scsi_cmnd *srb, struct rtsx_chip *chip)
{
struct ms_info *ms_card = &(chip->ms_card);
unsigned int lun = SCSI_LUN(srb);
} while (len);
}
-int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
+static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
struct scatterlist *sg, int num_sg, unsigned int *index,
unsigned int *offset, int size,
enum dma_data_direction dma_dir, int timeout)
return err;
}
-int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
+static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
struct scatterlist *sg, int num_sg,
enum dma_data_direction dma_dir, int timeout)
{
return err;
}
-int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
+static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
enum dma_data_direction dma_dir, int timeout)
{
struct rtsx_dev *rtsx = chip->rtsx;
#define SD_MAX_RETRY_COUNT 3
-u16 REG_SD_CFG1;
-u16 REG_SD_CFG2;
-u16 REG_SD_CFG3;
-u16 REG_SD_STAT1;
-u16 REG_SD_STAT2;
-u16 REG_SD_BUS_STAT;
-u16 REG_SD_PAD_CTL;
-u16 REG_SD_SAMPLE_POINT_CTL;
-u16 REG_SD_PUSH_POINT_CTL;
-u16 REG_SD_CMD0;
-u16 REG_SD_CMD1;
-u16 REG_SD_CMD2;
-u16 REG_SD_CMD3;
-u16 REG_SD_CMD4;
-u16 REG_SD_CMD5;
-u16 REG_SD_BYTE_CNT_L;
-u16 REG_SD_BYTE_CNT_H;
-u16 REG_SD_BLOCK_CNT_L;
-u16 REG_SD_BLOCK_CNT_H;
-u16 REG_SD_TRANSFER;
-u16 REG_SD_VPCLK0_CTL;
-u16 REG_SD_VPCLK1_CTL;
-u16 REG_SD_DCMPS0_CTL;
-u16 REG_SD_DCMPS1_CTL;
+static u16 REG_SD_CFG1;
+static u16 REG_SD_CFG2;
+static u16 REG_SD_CFG3;
+static u16 REG_SD_STAT1;
+static u16 REG_SD_STAT2;
+static u16 REG_SD_BUS_STAT;
+static u16 REG_SD_PAD_CTL;
+static u16 REG_SD_SAMPLE_POINT_CTL;
+static u16 REG_SD_PUSH_POINT_CTL;
+static u16 REG_SD_CMD0;
+static u16 REG_SD_CMD1;
+static u16 REG_SD_CMD2;
+static u16 REG_SD_CMD3;
+static u16 REG_SD_CMD4;
+static u16 REG_SD_CMD5;
+static u16 REG_SD_BYTE_CNT_L;
+static u16 REG_SD_BYTE_CNT_H;
+static u16 REG_SD_BLOCK_CNT_L;
+static u16 REG_SD_BLOCK_CNT_H;
+static u16 REG_SD_TRANSFER;
+static u16 REG_SD_VPCLK0_CTL;
+static u16 REG_SD_VPCLK1_CTL;
+static u16 REG_SD_DCMPS0_CTL;
+static u16 REG_SD_DCMPS1_CTL;
static inline void sd_set_err_code(struct rtsx_chip *chip, u8 err_code)
{
return STATUS_SUCCESS;
}
-int spi_eeprom_program_enable(struct rtsx_chip *chip)
+static int spi_eeprom_program_enable(struct rtsx_chip *chip)
{
int retval;