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>
This commit is contained in:
Malcolm Priestley 2015-08-15 21:57:34 +01:00 committed by Greg Kroah-Hartman
parent 9fc7091cc2
commit 88defe2b35
4 changed files with 18 additions and 18 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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;