Skip to content

Commit

Permalink
staging: rts5208: remove rtsx_read_pci_cfg_byte()
Browse files Browse the repository at this point in the history
Remove unused rtsx_read_pci_cfg_byte() function.

Signed-off-by: Sinan Kaya <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Sinan Kaya authored and gregkh committed Nov 28, 2017
1 parent f7de67f commit 1c0c275
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions drivers/staging/rts5208/rtsx.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,23 +275,6 @@ static int rtsx_acquire_irq(struct rtsx_dev *dev)
return 0;
}

int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val)
{
struct pci_dev *pdev;
u8 data;
u8 devfn = (dev << 3) | func;

pdev = pci_get_bus_and_slot(bus, devfn);
if (!pdev)
return -1;

pci_read_config_byte(pdev, offset, &data);
if (val)
*val = data;

return 0;
}

#ifdef CONFIG_PM
/*
* power management
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/rts5208/rtsx.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ static inline void get_current_time(u8 *timeval_buf, int buf_len)
/* struct scsi_cmnd transfer buffer access utilities */
enum xfer_buf_dir {TO_XFER_BUF, FROM_XFER_BUF};

int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val);

#define _MSG_TRACE

#include "trace.h"
Expand Down

0 comments on commit 1c0c275

Please sign in to comment.