summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2015-08-15 21:57:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-12 18:24:26 -0700
commit88defe2b35f1b765dbfe9a800c443c31400a4e13 (patch)
tree695d55dbc8056e5cc7672b899baebcb0e7d4a5b2
parent9fc7091cc24ceae25885a3ad074689cfb029f3c0 (diff)
staging: vt6655: replace typedef struct tagDEVICE_RD_INFO
with struct vnt_rd_info volatile is removed because it will generate a warning (in any case this member is not) and renaming rd_info. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/vt6655/desc.h6
-rw-r--r--drivers/staging/vt6655/device.h4
-rw-r--r--drivers/staging/vt6655/device_main.c24
-rw-r--r--drivers/staging/vt6655/dpc.c2
4 files changed, 18 insertions, 18 deletions
diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h
index eb0c7c3c987d..752c54683c7f 100644
--- a/drivers/staging/vt6655/desc.h
+++ b/drivers/staging/vt6655/desc.h
@@ -167,10 +167,10 @@
* leads error.
*/
-typedef struct tagDEVICE_RD_INFO {
+struct vnt_rd_info {
struct sk_buff *skb;
dma_addr_t skb_dma;
-} DEVICE_RD_INFO, *PDEVICE_RD_INFO;
+};
struct vnt_rdes0 {
volatile __le16 res_count;
@@ -201,7 +201,7 @@ typedef struct tagSRxDesc {
volatile __le32 buff_addr;
volatile __le32 next_desc;
struct tagSRxDesc *next __aligned(8);
- volatile PDEVICE_RD_INFO pRDInfo __aligned(8);
+ struct vnt_rd_info *rd_info __aligned(8);
} __attribute__ ((__packed__))
SRxDesc, *PSRxDesc;
typedef const SRxDesc *PCSRxDesc;
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index c9fa6ef42d34..80cc17005d8f 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -410,9 +410,9 @@ struct vnt_private {
struct ieee80211_low_level_stats low_stats;
};
-static inline PDEVICE_RD_INFO alloc_rd_info(void)
+static inline struct vnt_rd_info *alloc_rd_info(void)
{
- return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC);
+ return kzalloc(sizeof(struct vnt_rd_info), GFP_ATOMIC);
}
static inline struct vnt_td_info *alloc_td_info(void)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 22c195757f89..defdcc015d12 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -622,7 +622,7 @@ static void device_init_rd0_ring(struct vnt_private *pDevice)
/* Init the RD0 ring entries */
for (i = 0; i < pDevice->sOpts.nRxDescs0; i ++, curr += sizeof(SRxDesc)) {
pDesc = &(pDevice->aRD0Ring[i]);
- pDesc->pRDInfo = alloc_rd_info();
+ pDesc->rd_info = alloc_rd_info();
if (!device_alloc_rx_buf(pDevice, pDesc))
dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
@@ -645,7 +645,7 @@ static void device_init_rd1_ring(struct vnt_private *pDevice)
/* Init the RD1 ring entries */
for (i = 0; i < pDevice->sOpts.nRxDescs1; i ++, curr += sizeof(SRxDesc)) {
pDesc = &(pDevice->aRD1Ring[i]);
- pDesc->pRDInfo = alloc_rd_info();
+ pDesc->rd_info = alloc_rd_info();
if (!device_alloc_rx_buf(pDevice, pDesc))
dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
@@ -665,14 +665,14 @@ static void device_free_rd0_ring(struct vnt_private *pDevice)
for (i = 0; i < pDevice->sOpts.nRxDescs0; i++) {
PSRxDesc pDesc = &(pDevice->aRD0Ring[i]);
- PDEVICE_RD_INFO pRDInfo = pDesc->pRDInfo;
+ struct vnt_rd_info *rd_info = pDesc->rd_info;
- dma_unmap_single(&pDevice->pcid->dev, pRDInfo->skb_dma,
+ dma_unmap_single(&pDevice->pcid->dev, rd_info->skb_dma,
pDevice->rx_buf_sz, DMA_FROM_DEVICE);
- dev_kfree_skb(pRDInfo->skb);
+ dev_kfree_skb(rd_info->skb);
- kfree(pDesc->pRDInfo);
+ kfree(pDesc->rd_info);
}
}
@@ -682,14 +682,14 @@ static void device_free_rd1_ring(struct vnt_private *pDevice)
for (i = 0; i < pDevice->sOpts.nRxDescs1; i++) {
PSRxDesc pDesc = &(pDevice->aRD1Ring[i]);
- PDEVICE_RD_INFO pRDInfo = pDesc->pRDInfo;
+ struct vnt_rd_info *rd_info = pDesc->rd_info;
- dma_unmap_single(&pDevice->pcid->dev, pRDInfo->skb_dma,
+ dma_unmap_single(&pDevice->pcid->dev, rd_info->skb_dma,
pDevice->rx_buf_sz, DMA_FROM_DEVICE);
- dev_kfree_skb(pRDInfo->skb);
+ dev_kfree_skb(rd_info->skb);
- kfree(pDesc->pRDInfo);
+ kfree(pDesc->rd_info);
}
}
@@ -783,7 +783,7 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx)
if (works++ > 15)
break;
- if (!pRD->pRDInfo->skb)
+ if (!pRD->rd_info->skb)
break;
if (vnt_receive_frame(pDevice, pRD)) {
@@ -803,7 +803,7 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx)
static bool device_alloc_rx_buf(struct vnt_private *pDevice, PSRxDesc pRD)
{
- PDEVICE_RD_INFO pRDInfo = pRD->pRDInfo;
+ struct vnt_rd_info *pRDInfo = pRD->rd_info;
pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
if (pRDInfo->skb == NULL)
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index ef39cbe28940..46591859f544 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -134,7 +134,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,
bool vnt_receive_frame(struct vnt_private *priv, PSRxDesc curr_rd)
{
- PDEVICE_RD_INFO rd_info = curr_rd->pRDInfo;
+ struct vnt_rd_info *rd_info = curr_rd->rd_info;
struct sk_buff *skb;
u16 frame_size;