Skip to content

Commit 3691b58

Browse files
Red54gregkh
authored andcommitted
staging: rtl8723bs: Remove some unused functions, macros, and structs
Remove some functions, macros, and structs that have not been used since they were introduced in commit 554c0a3 ("staging: Add rtl8723bs sdio wifi driver"). Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/tencent_C69BFF8D3EC7B66BFCF0063ED3DEF4BC590A@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ed37518 commit 3691b58

File tree

6 files changed

+3
-463
lines changed

6 files changed

+3
-463
lines changed

drivers/staging/rtl8723bs/hal/hal_com.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,9 @@ static u32 Array_kfreemap[] = {
884884
0xfc, 0x0,
885885
};
886886

887+
#define REG_RF_BB_GAIN_OFFSET 0x7f
888+
//#define RF_GAIN_OFFSET_MASK 0xfffff
889+
887890
void rtw_bb_rf_gain_offset(struct adapter *padapter)
888891
{
889892
u8 value = padapter->eeprompriv.EEPROMRFGainOffset;

drivers/staging/rtl8723bs/include/osdep_intf.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,6 @@
88
#ifndef __OSDEP_INTF_H_
99
#define __OSDEP_INTF_H_
1010

11-
12-
struct intf_priv {
13-
14-
u8 *intf_dev;
15-
u32 max_iosz; /* USB2.0: 128, USB1.1: 64, SDIO:64 */
16-
u32 max_xmitsz; /* USB2.0: unlimited, SDIO:512 */
17-
u32 max_recvsz; /* USB2.0: unlimited, SDIO:512 */
18-
19-
volatile u8 *io_rwmem;
20-
volatile u8 *allocated_io_rwmem;
21-
u32 io_wsz; /* unit: 4bytes */
22-
u32 io_rsz;/* unit: 4bytes */
23-
u8 intf_status;
24-
25-
void (*_bus_io)(u8 *priv);
26-
27-
/*
28-
Under Sync. IRP (SDIO/USB)
29-
A protection mechanism is necessary for the io_rwmem(read/write protocol)
30-
31-
Under Async. IRP (SDIO/USB)
32-
The protection mechanism is through the pending queue.
33-
*/
34-
35-
struct mutex ioctl_mutex;
36-
};
37-
3811
struct dvobj_priv *devobj_init(void);
3912
void devobj_deinit(struct dvobj_priv *pdvobj);
4013

drivers/staging/rtl8723bs/include/rtl8723b_hal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "rtl8723b_recv.h"
1616
#include "rtl8723b_xmit.h"
1717
#include "rtl8723b_cmd.h"
18-
#include "rtw_mp.h"
1918
#include "hal_pwr_seq.h"
2019
#include "Hal8192CPhyReg.h"
2120
#include "hal_phy_cfg.h"

drivers/staging/rtl8723bs/include/rtw_io.h

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,7 @@
88
#ifndef _RTW_IO_H_
99
#define _RTW_IO_H_
1010

11-
/*
12-
For prompt mode accessing, caller shall free io_req
13-
Otherwise, io_handler will free io_req
14-
*/
15-
16-
/* below is for the intf_option bit definition... */
17-
18-
struct intf_priv;
1911
struct intf_hdl;
20-
struct io_queue;
2112

2213
struct _io_ops {
2314
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
@@ -36,8 +27,6 @@ struct _io_ops {
3627
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
3728
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
3829

39-
void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);
40-
4130
u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
4231

4332
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
@@ -49,18 +38,6 @@ struct _io_ops {
4938
void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
5039
};
5140

52-
struct io_req {
53-
struct list_head list;
54-
u32 addr;
55-
volatile u32 val;
56-
u32 command;
57-
u32 status;
58-
u8 *pbuf;
59-
60-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt);
61-
u8 *cnxt;
62-
};
63-
6441
struct intf_hdl {
6542
struct adapter *padapter;
6643
struct dvobj_priv *pintf_dev;/* pointer to &(padapter->dvobjpriv); */
@@ -74,21 +51,6 @@ struct intf_hdl {
7451
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj);
7552
void rtw_reset_continual_io_error(struct dvobj_priv *dvobj);
7653

77-
/*
78-
Below is the data structure used by _io_handler
79-
80-
*/
81-
82-
struct io_queue {
83-
spinlock_t lock;
84-
struct list_head free_ioreqs;
85-
struct list_head pending; /* The io_req list that will be served in the single protocol read/write. */
86-
struct list_head processing;
87-
u8 *free_ioreqs_buf; /* 4-byte aligned */
88-
u8 *pallocated_free_ioreqs_buf;
89-
struct intf_hdl intf;
90-
};
91-
9254
struct io_priv {
9355

9456
struct adapter *padapter;
@@ -97,20 +59,6 @@ struct io_priv {
9759

9860
};
9961

100-
extern uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
101-
extern void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue);
102-
extern uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
103-
104-
105-
extern uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
106-
extern struct io_req *alloc_ioreq(struct io_queue *pio_q);
107-
108-
extern uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
109-
extern void unregister_intf_hdl(struct intf_hdl *pintfhdl);
110-
111-
extern void _rtw_attrib_read(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
112-
extern void _rtw_attrib_write(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
113-
11462
extern u8 rtw_read8(struct adapter *adapter, u32 addr);
11563
extern u16 rtw_read16(struct adapter *adapter, u32 addr);
11664
extern u32 rtw_read32(struct adapter *adapter, u32 addr);
@@ -121,46 +69,6 @@ extern int rtw_write32(struct adapter *adapter, u32 addr, u32 val);
12169

12270
extern u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
12371

124-
extern void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem);
125-
126-
/* ioreq */
127-
extern void ioreq_read8(struct adapter *adapter, u32 addr, u8 *pval);
128-
extern void ioreq_read16(struct adapter *adapter, u32 addr, u16 *pval);
129-
extern void ioreq_read32(struct adapter *adapter, u32 addr, u32 *pval);
130-
extern void ioreq_write8(struct adapter *adapter, u32 addr, u8 val);
131-
extern void ioreq_write16(struct adapter *adapter, u32 addr, u16 val);
132-
extern void ioreq_write32(struct adapter *adapter, u32 addr, u32 val);
133-
134-
135-
extern uint async_read8(struct adapter *adapter, u32 addr, u8 *pbuff,
136-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
137-
extern uint async_read16(struct adapter *adapter, u32 addr, u8 *pbuff,
138-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
139-
extern uint async_read32(struct adapter *adapter, u32 addr, u8 *pbuff,
140-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
141-
142-
extern void async_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
143-
extern void async_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
144-
145-
extern void async_write8(struct adapter *adapter, u32 addr, u8 val,
146-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
147-
extern void async_write16(struct adapter *adapter, u32 addr, u16 val,
148-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
149-
extern void async_write32(struct adapter *adapter, u32 addr, u32 val,
150-
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
151-
152-
extern void async_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
153-
extern void async_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
154-
155-
15672
int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapter *padapter, struct _io_ops *pops));
15773

158-
159-
extern uint alloc_io_queue(struct adapter *adapter);
160-
extern void free_io_queue(struct adapter *adapter);
161-
extern void async_bus_io(struct io_queue *pio_q);
162-
extern void bus_sync_io(struct io_queue *pio_q);
163-
extern u32 _ioreq2rwmem(struct io_queue *pio_q);
164-
extern void dev_power_down(struct adapter *Adapter, u8 bpwrup);
165-
16674
#endif /* _RTL8711_IO_H_ */

0 commit comments

Comments
 (0)