Staging: bcm: Remove typedef for _PER_TARANG_DATA and call directly.
This patch removes typedef for _PER_TARANG_DATA,
changes the name of the struct from
_PER_TARANG_DATA to bcm_per_tarang_data.
In addition, any calls to the following typedefs
"PER_TARANG_DATA, *PPER_TARANG_DATA" are
changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index ade2b0d..7f58322 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -239,8 +239,8 @@
};
typedef struct _packet_info PacketInfo;
-typedef struct _PER_TARANG_DATA {
- struct _PER_TARANG_DATA *next;
+struct bcm_tarang_data {
+ struct bcm_tarang_data *next;
struct _MINI_ADAPTER *Adapter;
struct sk_buff *RxAppControlHead;
struct sk_buff *RxAppControlTail;
@@ -249,7 +249,7 @@
BOOLEAN bApplicationToExit;
S_MIBS_DROPPED_APP_CNTRL_MESSAGES stDroppedAppCntrlMsgs;
ULONG RxCntrlMsgBitMask;
-} PER_TARANG_DATA, *PPER_TARANG_DATA;
+};
struct bcm_targetdsx_buffer {
ULONG ulTargetDsxBuffer;
@@ -280,7 +280,7 @@
struct sk_buff *RxControlTail;
struct semaphore RxAppControlQueuelock;
struct semaphore fw_download_sema;
- PPER_TARANG_DATA pTarangs;
+ struct bcm_tarang_data *pTarangs;
spinlock_t control_queue_lock;
wait_queue_head_t process_read_wait_queue;
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index cd0348e..03dc2b0 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -16,10 +16,10 @@
static int bcm_char_open(struct inode *inode, struct file * filp)
{
PMINI_ADAPTER Adapter = NULL;
- PPER_TARANG_DATA pTarang = NULL;
+ struct bcm_tarang_data *pTarang = NULL;
Adapter = GET_BCM_ADAPTER(gblpnetdev);
- pTarang = kzalloc(sizeof(PER_TARANG_DATA), GFP_KERNEL);
+ pTarang = kzalloc(sizeof(struct bcm_tarang_data), GFP_KERNEL);
if (!pTarang)
return -ENOMEM;
@@ -43,11 +43,11 @@
static int bcm_char_release(struct inode *inode, struct file *filp)
{
- PPER_TARANG_DATA pTarang, tmp, ptmp;
+ struct bcm_tarang_data *pTarang, *tmp, *ptmp;
PMINI_ADAPTER Adapter = NULL;
struct sk_buff *pkt, *npkt;
- pTarang = (PPER_TARANG_DATA)filp->private_data;
+ pTarang = (struct bcm_tarang_data *)filp->private_data;
if (pTarang == NULL) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
@@ -97,7 +97,7 @@
static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size,
loff_t *f_pos)
{
- PPER_TARANG_DATA pTarang = filp->private_data;
+ struct bcm_tarang_data *pTarang = filp->private_data;
PMINI_ADAPTER Adapter = pTarang->Adapter;
struct sk_buff *Packet = NULL;
ssize_t PktLen = 0;
@@ -155,7 +155,7 @@
static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
{
- PPER_TARANG_DATA pTarang = filp->private_data;
+ struct bcm_tarang_data *pTarang = filp->private_data;
void __user *argp = (void __user *)arg;
PMINI_ADAPTER Adapter = pTarang->Adapter;
INT Status = STATUS_FAILURE;
diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c
index b058e30..691b366 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -13,7 +13,7 @@
*/
static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
{
- PPER_TARANG_DATA pTarang = NULL;
+ struct bcm_tarang_data *pTarang = NULL;
BOOLEAN HighPriorityMessage = FALSE;
struct sk_buff *newPacket = NULL;
CHAR cntrl_msg_mask_bit = 0;
@@ -214,7 +214,7 @@
INT flushAllAppQ(void)
{
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
- PPER_TARANG_DATA pTarang = NULL;
+ struct bcm_tarang_data *pTarang = NULL;
struct sk_buff *PacketToDrop = NULL;
for (pTarang = Adapter->pTarangs; pTarang; pTarang = pTarang->next) {
while (pTarang->RxAppControlHead != NULL) {
diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h
index a8676b9..b22f61d 100644
--- a/drivers/staging/bcm/Prototypes.h
+++ b/drivers/staging/bcm/Prototypes.h
@@ -89,7 +89,7 @@
int ProcessGetHostMibs(PMINI_ADAPTER Adapter, S_MIBS_HOST_STATS_MIBS *buf);
-void GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *ioBuffer, PPER_TARANG_DATA pTarang);
+void GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *ioBuffer, struct bcm_tarang_data *pTarang);
void beceem_parse_target_struct(PMINI_ADAPTER Adapter);
int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, struct bcm_firmware_info *psFwInfo);
diff --git a/drivers/staging/bcm/hostmibs.c b/drivers/staging/bcm/hostmibs.c
index 101c4e3..27ddcbf 100644
--- a/drivers/staging/bcm/hostmibs.c
+++ b/drivers/staging/bcm/hostmibs.c
@@ -94,7 +94,7 @@
return STATUS_SUCCESS;
}
-VOID GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *pstHostMibs, const PPER_TARANG_DATA pTarang)
+VOID GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *pstHostMibs, struct bcm_tarang_data *pTarang)
{
memcpy(&(pstHostMibs->stDroppedAppCntrlMsgs),
&(pTarang->stDroppedAppCntrlMsgs),