* [PATCH 2/7] staging:ft1000: Remove DSPINITMSG typedef usage.
2010-10-15 12:12 [PATCH 1/7] staging:ft1000: Remove MEDIAMSG typedef usage Marek Belisko
@ 2010-10-15 12:12 ` Marek Belisko
2010-10-15 12:13 ` [PATCH 3/7] staging:ft1000: Remove APP_INFO_BLOCK " Marek Belisko
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2010-10-15 12:12 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Marek Belisko
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 6 +++---
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 24 ++++++++++++------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index f88dcf0..519f578 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1837,7 +1837,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
u16 msgtype;
u16 tempword;
struct media_msg *pmediamsg;
- PDSPINITMSG pdspinitmsg;
+ struct dsp_init_msg *pdspinitmsg;
PDRVMSG pdrvmsg;
u16 i;
PPSEUDO_HDR ppseudo_hdr;
@@ -1924,7 +1924,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
case DSP_INIT_MSG: {
DEBUG("ft1000_proc_drvmsg:Command message type = DSP_INIT_MSG");
- pdspinitmsg = (PDSPINITMSG)&cmdbuffer[2];
+ pdspinitmsg = (struct dsp_init_msg *)&cmdbuffer[2];
memcpy(info->DspVer, pdspinitmsg->DspVer, DSPVERSZ);
DEBUG("DSPVER = 0x%2x 0x%2x 0x%2x 0x%2x\n", info->DspVer[0], info->DspVer[1], info->DspVer[2], info->DspVer[3]);
memcpy(info->HwSerNum, pdspinitmsg->HwSerNum, HWSERNUMSZ);
@@ -1938,7 +1938,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
dev->net->dev_addr[4] = info->eui64[6];
dev->net->dev_addr[5] = info->eui64[7];
- if (ntohs(pdspinitmsg->length) == (sizeof(DSPINITMSG) - 20) ) {
+ if (ntohs(pdspinitmsg->length) == (sizeof(struct dsp_init_msg) - 20)) {
memcpy(info->ProductMode, pdspinitmsg->ProductMode, MODESZ);
memcpy(info->RfCalVer, pdspinitmsg->RfCalVer, CALVERSZ);
memcpy(info->RfCalDate, pdspinitmsg->RfCalDate, CALDATESZ);
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index bfd43fd..200f3c0 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -63,18 +63,18 @@ struct media_msg {
u32 dns_2;
} __attribute__ ((packed));
-typedef struct _DSPINITMSG {
- PSEUDO_HDR pseudo;
- u16 type;
- u16 length;
- u8 DspVer[DSPVERSZ]; // DSP version number
- u8 HwSerNum[HWSERNUMSZ]; // Hardware Serial Number
- u8 Sku[SKUSZ]; // SKU
- u8 eui64[EUISZ]; // EUI64
- u8 ProductMode[MODESZ]; // Product Mode (Market/Production)
- u8 RfCalVer[CALVERSZ]; // Rf Calibration version
- u8 RfCalDate[CALDATESZ]; // Rf Calibration date
-} __attribute__ ((packed)) DSPINITMSG, *PDSPINITMSG;
+struct dsp_init_msg {
+ PSEUDO_HDR pseudo;
+ u16 type;
+ u16 length;
+ u8 DspVer[DSPVERSZ]; // DSP version number
+ u8 HwSerNum[HWSERNUMSZ]; // Hardware Serial Number
+ u8 Sku[SKUSZ]; // SKU
+ u8 eui64[EUISZ]; // EUI64
+ u8 ProductMode[MODESZ]; // Product Mode (Market/Production)
+ u8 RfCalVer[CALVERSZ]; // Rf Calibration version
+ u8 RfCalDate[CALDATESZ]; // Rf Calibration date
+} __attribute__ ((packed));
typedef struct _APP_INFO_BLOCK
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/7] staging:ft1000: Remove APP_INFO_BLOCK typedef usage.
2010-10-15 12:12 [PATCH 1/7] staging:ft1000: Remove MEDIAMSG typedef usage Marek Belisko
2010-10-15 12:12 ` [PATCH 2/7] staging:ft1000: Remove DSPINITMSG " Marek Belisko
@ 2010-10-15 12:13 ` Marek Belisko
2010-10-15 12:13 ` [PATCH 4/7] staging:ft1000: Remove PROV_RECORD " Marek Belisko
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2010-10-15 12:13 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Marek Belisko
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 27 +++++++++++------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index 200f3c0..3fce7f6 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -77,19 +77,18 @@ struct dsp_init_msg {
} __attribute__ ((packed));
-typedef struct _APP_INFO_BLOCK
-{
- u32 nTxMsg; // DPRAM msg sent to DSP with app_id
- u32 nRxMsg; // DPRAM msg rcv from dsp with app_id
- u32 nTxMsgReject; // DPRAM msg rejected due to DSP doorbell set
- u32 nRxMsgMiss; // DPRAM msg dropped due to overflow
- struct fown_struct *fileobject;// Application's file object
- u16 app_id; // Application id
- int DspBCMsgFlag;
- int NumOfMsg; // number of messages queued up
- wait_queue_head_t wait_dpram_msg;
- struct list_head app_sqlist; // link list of msgs for applicaton on slow queue
-} APP_INFO_BLOCK, *PAPP_INFO_BLOCK;
+struct app_info_block {
+ u32 nTxMsg; // DPRAM msg sent to DSP with app_id
+ u32 nRxMsg; // DPRAM msg rcv from dsp with app_id
+ u32 nTxMsgReject; // DPRAM msg rejected due to DSP doorbell set
+ u32 nRxMsgMiss; // DPRAM msg dropped due to overflow
+ struct fown_struct *fileobject;// Application's file object
+ u16 app_id; // Application id
+ int DspBCMsgFlag;
+ int NumOfMsg; // number of messages queued up
+ wait_queue_head_t wait_dpram_msg;
+ struct list_head app_sqlist; // link list of msgs for applicaton on slow queue
+} __attribute__((packed));
typedef struct _PROV_RECORD {
struct list_head list;
@@ -582,7 +581,7 @@ typedef struct _FT1000_INFO {
u16 ProgConStat;
struct list_head prov_list;
int appcnt;
- APP_INFO_BLOCK app_info[MAX_NUM_APP]; //Added by Jim
+ struct app_info_block app_info[MAX_NUM_APP];
u16 DSPInfoBlklen;
u16 DrvMsgPend;
int (*ft1000_reset)(struct net_device *dev);
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/7] staging:ft1000: Remove PROV_RECORD typedef usage.
2010-10-15 12:12 [PATCH 1/7] staging:ft1000: Remove MEDIAMSG typedef usage Marek Belisko
2010-10-15 12:12 ` [PATCH 2/7] staging:ft1000: Remove DSPINITMSG " Marek Belisko
2010-10-15 12:13 ` [PATCH 3/7] staging:ft1000: Remove APP_INFO_BLOCK " Marek Belisko
@ 2010-10-15 12:13 ` Marek Belisko
2010-10-15 12:13 ` [PATCH 5/7] staging:ft1000: Remove PSEUDO_HDR " Marek Belisko
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2010-10-15 12:13 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Marek Belisko
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
.../staging/ft1000/ft1000-usb/ft1000_download.c | 5 ++---
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 8 ++++----
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 8 ++++----
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 4e506aa..b950634 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -777,7 +777,6 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
USHORT handshake;
PPSEUDO_HDR pHdr;
USHORT usHdrLength;
- //PPROV_RECORD pProvRecord;
long word_length;
USHORT request;
USHORT temp;
@@ -801,7 +800,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
USHORT dpram = 0;
PUCHAR pbuffer;
- PPROV_RECORD pprov_record;
+ struct prov_record *pprov_record;
FT1000_INFO *pft1000info = netdev_priv(ft1000dev->net);
DEBUG("Entered scram_dnldr...\n");
@@ -1184,7 +1183,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
if (pbuffer) {
memcpy(pbuffer, (void *)pUcFile, (UINT)(usHdrLength + sizeof(PSEUDO_HDR)));
// link provisioning data
- pprov_record = kmalloc( sizeof(PROV_RECORD), GFP_ATOMIC );
+ pprov_record = kmalloc(sizeof(struct prov_record), GFP_ATOMIC);
if (pprov_record) {
pprov_record->pprov_data = pbuffer;
list_add_tail (&pprov_record->list, &pft1000info->prov_list);
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 519f578..4a7e007 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -722,7 +722,7 @@ static int ft1000_reset_card (struct net_device *dev)
FT1000_INFO *info = netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
u16 tempword;
- PPROV_RECORD ptr;
+ struct prov_record *ptr;
DEBUG("ft1000_hw:ft1000_reset_card called.....\n");
@@ -733,7 +733,7 @@ static int ft1000_reset_card (struct net_device *dev)
// Make sure we free any memory reserve for provisioning
while (list_empty(&info->prov_list) == 0) {
DEBUG("ft1000_hw:ft1000_reset_card:deleting provisioning record\n");
- ptr = list_entry(info->prov_list.next, PROV_RECORD, list);
+ ptr = list_entry(info->prov_list.next, struct prov_record, list);
list_del(&ptr->list);
kfree(ptr->pprov_data);
kfree(ptr);
@@ -1754,7 +1754,7 @@ static int ft1000_dsp_prov(void *arg)
u16 tempword;
u16 len;
u16 i=0;
- PPROV_RECORD ptr;
+ struct prov_record *ptr;
PPSEUDO_HDR ppseudo_hdr;
PUSHORT pmsg;
u16 status;
@@ -1789,7 +1789,7 @@ static int ft1000_dsp_prov(void *arg)
DEBUG("*** Provision Data Sent to DSP\n");
// Send provisioning data
- ptr = list_entry(info->prov_list.next, PROV_RECORD, list);
+ ptr = list_entry(info->prov_list.next, struct prov_record, list);
len = *(u16 *)ptr->pprov_data;
len = htons(len);
len += PSEUDOSZ;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index 3fce7f6..673a245 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -90,10 +90,10 @@ struct app_info_block {
struct list_head app_sqlist; // link list of msgs for applicaton on slow queue
} __attribute__((packed));
-typedef struct _PROV_RECORD {
- struct list_head list;
- u8 *pprov_data;
-} PROV_RECORD, *PPROV_RECORD;
+struct prov_record {
+ struct list_head list;
+ u8 *pprov_data;
+};
/*end of Jim*/
#define DEBUG(args...) printk(KERN_INFO args)
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/7] staging:ft1000: Remove PSEUDO_HDR typedef usage.
2010-10-15 12:12 [PATCH 1/7] staging:ft1000: Remove MEDIAMSG typedef usage Marek Belisko
` (2 preceding siblings ...)
2010-10-15 12:13 ` [PATCH 4/7] staging:ft1000: Remove PROV_RECORD " Marek Belisko
@ 2010-10-15 12:13 ` Marek Belisko
2010-10-15 12:13 ` [PATCH 6/7] staging:ft1000: Remove DRVMGS " Marek Belisko
2010-10-15 12:13 ` [PATCH 7/7] staging:ft1000: Remove FT1000_INFO " Marek Belisko
5 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2010-10-15 12:13 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Marek Belisko
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 6 +-
.../staging/ft1000/ft1000-usb/ft1000_download.c | 14 +++---
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 22 +++++-----
drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h | 7 +--
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 41 +------------------
5 files changed, 27 insertions(+), 63 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 539607f..e2a9278 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -655,7 +655,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
//IOCTL_DPRAM_COMMAND dpram_command;
USHORT qtype;
USHORT msgsz;
- PPSEUDO_HDR ppseudo_hdr;
+ struct pseudo_hdr *ppseudo_hdr;
PUSHORT pmsg;
USHORT total_len;
USHORT app_index;
@@ -768,7 +768,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
// Need to put sequence number plus new checksum for message
//pmsg = (PUSHORT)&dpram_command.dpram_blk.pseudohdr;
pmsg = (PUSHORT)&dpram_data->pseudohdr;
- ppseudo_hdr = (PPSEUDO_HDR)pmsg;
+ ppseudo_hdr = (struct pseudo_hdr *)pmsg;
total_len = msgsz+2;
if (total_len & 0x1) {
total_len++;
@@ -785,7 +785,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
//DEBUG("checksum = 0x%x\n", ppseudo_hdr->checksum);
}
pmsg++;
- ppseudo_hdr = (PPSEUDO_HDR)pmsg;
+ ppseudo_hdr = (struct pseudo_hdr *)pmsg;
#if 0
ptr = dpram_data;
DEBUG("FT1000:ft1000_ChIoctl: Command Send\n");
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index b950634..48eb697 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -507,7 +507,7 @@ static void put_request_value(struct ft1000_device *ft1000dev, long lvalue)
//---------------------------------------------------------------------------
// Function: hdr_checksum
//
-// Parameters: PPSEUDO_HDR pHdr - Pseudo header pointer
+// Parameters: struct pseudo_hdr *pHdr - Pseudo header pointer
//
// Returns: checksum - success
//
@@ -516,7 +516,7 @@ static void put_request_value(struct ft1000_device *ft1000dev, long lvalue)
// Notes:
//
//---------------------------------------------------------------------------
-static USHORT hdr_checksum(PPSEUDO_HDR pHdr)
+static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
{
USHORT *usPtr = (USHORT *)pHdr;
USHORT chksum;
@@ -775,7 +775,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
u16 Status = STATUS_SUCCESS;
UINT uiState;
USHORT handshake;
- PPSEUDO_HDR pHdr;
+ struct pseudo_hdr *pHdr;
USHORT usHdrLength;
long word_length;
USHORT request;
@@ -1167,7 +1167,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
case STATE_SECTION_PROV:
DEBUG("FT1000:download:STATE_SECTION_PROV\n");
- pHdr = (PPSEUDO_HDR)pUcFile;
+ pHdr = (struct pseudo_hdr *)pUcFile;
if (pHdr->checksum == hdr_checksum(pHdr))
{
@@ -1179,16 +1179,16 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
usHdrLength = ntohs(pHdr->length); /* Byte length for PROV records */
// Get buffer for provisioning data
- pbuffer = kmalloc ( (usHdrLength + sizeof(PSEUDO_HDR) ), GFP_ATOMIC );
+ pbuffer = kmalloc((usHdrLength + sizeof(struct pseudo_hdr)), GFP_ATOMIC);
if (pbuffer) {
- memcpy(pbuffer, (void *)pUcFile, (UINT)(usHdrLength + sizeof(PSEUDO_HDR)));
+ memcpy(pbuffer, (void *)pUcFile, (UINT)(usHdrLength + sizeof(struct pseudo_hdr)));
// link provisioning data
pprov_record = kmalloc(sizeof(struct prov_record), GFP_ATOMIC);
if (pprov_record) {
pprov_record->pprov_data = pbuffer;
list_add_tail (&pprov_record->list, &pft1000info->prov_list);
// Move to next entry if available
- pUcFile = (UCHAR *)((unsigned long)pUcFile + (UINT)((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
+ pUcFile = (UCHAR *)((unsigned long)pUcFile + (UINT)((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(struct pseudo_hdr));
if ( (unsigned long)(pUcFile) - (unsigned long)(pFileStart) >= (unsigned long)FileLength) {
uiState = STATE_DONE_FILE;
}
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 4a7e007..efe47ac 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1237,7 +1237,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
//DEBUG("ft1000_copy_down_pkt() entered, len = %d\n", len);
- count = sizeof (PSEUDO_HDR) + len;
+ count = sizeof(struct pseudo_hdr) + len;
if(count > MAX_BUF_SIZE)
{
DEBUG("Error:ft1000_copy_down_pkt:Message Size Overflow!\n");
@@ -1263,7 +1263,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
checksum ^= *pTemp ++;
}
*pTemp++ = checksum;
- memcpy (&(pFt1000Dev->tx_buf[sizeof(PSEUDO_HDR)]), packet, len);
+ memcpy(&(pFt1000Dev->tx_buf[sizeof(struct pseudo_hdr)]), packet, len);
netif_stop_queue(netdev);
@@ -1476,7 +1476,7 @@ static int ft1000_copy_up_pkt (struct urb *urb)
- memcpy(pbuffer, ft1000dev->rx_buf+sizeof(PSEUDO_HDR), len-sizeof(PSEUDO_HDR));
+ memcpy(pbuffer, ft1000dev->rx_buf+sizeof(struct pseudo_hdr), len-sizeof(struct pseudo_hdr));
//DEBUG("ft1000_copy_up_pkt: Data passed to Protocol layer\n");
/*for (i=0; i<len+12; i++)
@@ -1755,7 +1755,7 @@ static int ft1000_dsp_prov(void *arg)
u16 len;
u16 i=0;
struct prov_record *ptr;
- PPSEUDO_HDR ppseudo_hdr;
+ struct pseudo_hdr *ppseudo_hdr;
PUSHORT pmsg;
u16 status;
USHORT TempShortBuf [256];
@@ -1795,7 +1795,7 @@ static int ft1000_dsp_prov(void *arg)
len += PSEUDOSZ;
pmsg = (PUSHORT)ptr->pprov_data;
- ppseudo_hdr = (PPSEUDO_HDR)pmsg;
+ ppseudo_hdr = (struct pseudo_hdr *)pmsg;
// Insert slow queue sequence number
ppseudo_hdr->seq_num = info->squeseqnum++;
ppseudo_hdr->portsrc = 0;
@@ -1840,7 +1840,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
struct dsp_init_msg *pdspinitmsg;
PDRVMSG pdrvmsg;
u16 i;
- PPSEUDO_HDR ppseudo_hdr;
+ struct pseudo_hdr *ppseudo_hdr;
PUSHORT pmsg;
u16 status;
union {
@@ -2008,7 +2008,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
pmsg = (PUSHORT)info->DSPInfoBlk;
*pmsg++ = 0;
*pmsg++ = htons(info->DSPInfoBlklen+20+info->DSPInfoBlklen);
- ppseudo_hdr = (PPSEUDO_HDR)(PUSHORT)&info->DSPInfoBlk[2];
+ ppseudo_hdr = (struct pseudo_hdr *)(PUSHORT)&info->DSPInfoBlk[2];
ppseudo_hdr->length = htons(info->DSPInfoBlklen+4+info->DSPInfoBlklen);
ppseudo_hdr->source = 0x10;
ppseudo_hdr->destination = 0x20;
@@ -2056,7 +2056,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
// Put message into Slow Queue
// Form Pseudo header
pmsg = (PUSHORT)&tempbuffer[0];
- ppseudo_hdr = (PPSEUDO_HDR)pmsg;
+ ppseudo_hdr = (struct pseudo_hdr *)pmsg;
ppseudo_hdr->length = htons(0x0012);
ppseudo_hdr->source = 0x10;
ppseudo_hdr->destination = 0x20;
@@ -2127,7 +2127,7 @@ int ft1000_poll(void* dev_id) {
USHORT portid;
u16 nxtph;
struct dpram_blk *pdpram_blk;
- PPSEUDO_HDR ppseudo_hdr;
+ struct pseudo_hdr *ppseudo_hdr;
unsigned long flags;
//DEBUG("Enter ft1000_poll...\n");
@@ -2180,7 +2180,7 @@ int ft1000_poll(void* dev_id) {
pdpram_blk = ft1000_get_buffer (&freercvpool);
if (pdpram_blk != NULL) {
if ( ft1000_receive_cmd(dev, pdpram_blk->pbuffer, MAX_CMD_SQSIZE, &nxtph) ) {
- ppseudo_hdr = (PPSEUDO_HDR)pdpram_blk->pbuffer;
+ ppseudo_hdr = (struct pseudo_hdr *)pdpram_blk->pbuffer;
// Put message into the appropriate application block
info->app_info[i].nRxMsg++;
spin_lock_irqsave(&free_buff_lock, flags);
@@ -2210,7 +2210,7 @@ int ft1000_poll(void* dev_id) {
//DEBUG("Memory allocated = 0x%8x\n", (u32)pdpram_blk);
if (pdpram_blk != NULL) {
if ( ft1000_receive_cmd(dev, pdpram_blk->pbuffer, MAX_CMD_SQSIZE, &nxtph) ) {
- ppseudo_hdr = (PPSEUDO_HDR)pdpram_blk->pbuffer;
+ ppseudo_hdr = (struct pseudo_hdr *)pdpram_blk->pbuffer;
// Search for correct application block
for (i=0; i<MAX_NUM_APP; i++) {
if (info->app_info[i].app_id == ppseudo_hdr->portdest) {
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
index e7d3ec8..3f72d5b 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
@@ -36,8 +36,7 @@
#define MAX_DNLD_BLKSZ 1024
// Standard Flarion Pseudo header
-typedef struct _PSEUDO_HDR
-{
+struct pseudo_hdr {
unsigned short length; //length of msg body
unsigned char source; //source address (0x10=Host 0x20=DSP)
unsigned char destination; //destination address (refer to source address)
@@ -57,7 +56,7 @@ typedef struct _PSEUDO_HDR
unsigned char rsvd2; //reserved
unsigned short qos_class; //Quality of Service class (Not applicable on Mobile)
unsigned short checksum; //Psuedo header checksum
-} __attribute__ ((packed)) PSEUDO_HDR, *PPSEUDO_HDR;
+} __attribute__ ((packed));
typedef struct _IOCTL_GET_VER
{
@@ -106,7 +105,7 @@ typedef struct _IOCTL_GET_DSP_STAT
typedef struct _IOCTL_DPRAM_BLK
{
unsigned short total_len;
- PSEUDO_HDR pseudohdr;
+ struct pseudo_hdr pseudohdr;
unsigned char buffer[1780];
} __attribute__ ((packed)) IOCTL_DPRAM_BLK, *PIOCTL_DPRAM_BLK;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index 673a245..bef9bcf 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -52,7 +52,7 @@
struct media_msg {
- PSEUDO_HDR pseudo;
+ struct pseudo_hdr pseudo;
u16 type;
u16 length;
u16 state;
@@ -64,7 +64,7 @@ struct media_msg {
} __attribute__ ((packed));
struct dsp_init_msg {
- PSEUDO_HDR pseudo;
+ struct pseudo_hdr pseudo;
u16 type;
u16 length;
u8 DspVer[DSPVERSZ]; // DSP version number
@@ -455,43 +455,8 @@ struct prov_record {
#define MAX_BUF_SIZE 4096
-
-#if 0 //Removed by Jim
-typedef struct _PSEUDO_HDR
-
-{
-
- unsigned short length;
-
- unsigned char source;
-
- unsigned char destination;
-
- unsigned char portdest;
-
- unsigned char portsrc;
-
- unsigned short sh_str_id;
-
- unsigned char control;
-
- unsigned char rsvd1;
-
- unsigned char seq_num;
-
- unsigned char rsvd2;
-
- unsigned short qos_class;
-
- unsigned short checksum;
-
-
-
-} PSEUDO_HDR, *PPSEUDO_HDR;
-#endif //end of Jim
-
typedef struct _DRVMSG {
- PSEUDO_HDR pseudo;
+ struct pseudo_hdr pseudo;
u16 type;
u16 length;
u8 data[0];
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 6/7] staging:ft1000: Remove DRVMGS typedef usage.
2010-10-15 12:12 [PATCH 1/7] staging:ft1000: Remove MEDIAMSG typedef usage Marek Belisko
` (3 preceding siblings ...)
2010-10-15 12:13 ` [PATCH 5/7] staging:ft1000: Remove PSEUDO_HDR " Marek Belisko
@ 2010-10-15 12:13 ` Marek Belisko
2010-10-15 12:13 ` [PATCH 7/7] staging:ft1000: Remove FT1000_INFO " Marek Belisko
5 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2010-10-15 12:13 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Marek Belisko
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
.../staging/ft1000/ft1000-usb/ft1000_download.c | 4 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 4 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 10 +++++-----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 48eb697..ee32f40 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -786,7 +786,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
struct dsp_image_info *pDspImageInfoV6 = NULL;
long requested_version;
BOOLEAN bGoodVersion;
- PDRVMSG pMailBoxData;
+ struct drv_msg *pMailBoxData;
USHORT *pUsData = NULL;
USHORT *pUsFile = NULL;
UCHAR *pUcFile = NULL;
@@ -1047,7 +1047,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
// Convert length from byte count to word count. Make sure we round up.
word_length = (long)(pft1000info->DSPInfoBlklen + 1)/2;
put_request_value(ft1000dev, word_length);
- pMailBoxData = (PDRVMSG)&(pft1000info->DSPInfoBlk[0]);
+ pMailBoxData = (struct drv_msg *)&(pft1000info->DSPInfoBlk[0]);
/*
* Position ASIC DPRAM auto-increment pointer.
*/
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index efe47ac..f8ca086 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1838,7 +1838,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
u16 tempword;
struct media_msg *pmediamsg;
struct dsp_init_msg *pdspinitmsg;
- PDRVMSG pdrvmsg;
+ struct drv_msg *pdrvmsg;
u16 i;
struct pseudo_hdr *ppseudo_hdr;
PUSHORT pmsg;
@@ -1872,7 +1872,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
}
}
#endif
- pdrvmsg = (PDRVMSG)&cmdbuffer[2];
+ pdrvmsg = (struct drv_msg *)&cmdbuffer[2];
msgtype = ntohs(pdrvmsg->type);
DEBUG("ft1000_proc_drvmsg:Command message type = 0x%x\n", msgtype);
switch (msgtype) {
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index bef9bcf..e3ecbea 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -455,12 +455,12 @@ struct prov_record {
#define MAX_BUF_SIZE 4096
-typedef struct _DRVMSG {
+struct drv_msg {
struct pseudo_hdr pseudo;
- u16 type;
- u16 length;
- u8 data[0];
-} __attribute__ ((packed)) DRVMSG, *PDRVMSG;
+ u16 type;
+ u16 length;
+ u8 data[0];
+} __attribute__ ((packed));
struct ft1000_device
{
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 7/7] staging:ft1000: Remove FT1000_INFO typedef usage.
2010-10-15 12:12 [PATCH 1/7] staging:ft1000: Remove MEDIAMSG typedef usage Marek Belisko
` (4 preceding siblings ...)
2010-10-15 12:13 ` [PATCH 6/7] staging:ft1000: Remove DRVMGS " Marek Belisko
@ 2010-10-15 12:13 ` Marek Belisko
2010-10-15 19:40 ` [PATCH 7/7] staging: ft1000: " Greg KH
5 siblings, 1 reply; 10+ messages in thread
From: Marek Belisko @ 2010-10-15 12:13 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Marek Belisko
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++-------
.../staging/ft1000/ft1000-usb/ft1000_download.c | 16 ++++----
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 42 ++++++++++----------
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++---
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +-
6 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index e2a9278..b76baf3 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -95,7 +95,7 @@ static struct file_operations ft1000fops =
//---------------------------------------------------------------------------
static int exec_mknod (void *pdata)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
char mjnum[4];
char minornum[4];
char temp[32];
@@ -137,13 +137,13 @@ static int exec_mknod (void *pdata)
static int rm_mknod (void *pdata)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
//char *argv[4]={"rm", "-f", "/dev/FT1000", NULL};
int retcode;
char temp[32];
char *argv[]={"rm", "-f", temp, NULL};
- info = (PFT1000_INFO)pdata;
+ info = (struct ft1000_info *)pdata;
DEBUG("ft1000_chdev:rm_mknod is called for device %s\n", info->DeviceName);
sprintf(temp, "%s%s", "/dev/", info->DeviceName) ;
@@ -235,7 +235,7 @@ void ft1000_free_buffer (struct dpram_blk *pdpram_blk, struct list_head *plist)
//---------------------------------------------------------------------------
int ft1000_CreateDevice(struct ft1000_device *dev)
{
- PFT1000_INFO info = netdev_priv(dev->net);
+ struct ft1000_info *info = netdev_priv(dev->net);
int result;
int i;
pid_t pid;
@@ -349,7 +349,7 @@ int ft1000_CreateDevice(struct ft1000_device *dev)
//---------------------------------------------------------------------------
void ft1000_DestroyDevice(struct net_device *dev)
{
- PFT1000_INFO info = netdev_priv(dev);
+ struct ft1000_info *info = netdev_priv(dev);
int result = 0;
pid_t pid;
int i;
@@ -412,7 +412,7 @@ void ft1000_DestroyDevice(struct net_device *dev)
//---------------------------------------------------------------------------
static int ft1000_ChOpen (struct inode *Inode, struct file *File)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
int i,num;
DEBUG("ft1000_ChOpen called\n");
@@ -423,8 +423,8 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
if ( pdevobj[num] != NULL )
- //info = (PFT1000_INFO)(pdevobj[num]->net->priv);
- info = (FT1000_INFO *) netdev_priv (pdevobj[num]->net);
+ //info = (struct ft1000_info *)(pdevobj[num]->net->priv);
+ info = (struct ft1000_info *)netdev_priv(pdevobj[num]->net);
else
{
DEBUG("ft1000_ChOpen: can not find device object %d\n", num);
@@ -480,7 +480,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
{
struct net_device *dev = file->private_data;
- PFT1000_INFO info;
+ struct ft1000_info *info;
int i;
//DEBUG("ft1000_ChPoll called\n");
@@ -489,7 +489,7 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
return (-EBADF);
}
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
// Search for matching file object
for (i=0; i<MAX_NUM_APP; i++) {
@@ -531,7 +531,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
{
void __user *argp = (void __user *)Argument;
struct net_device *dev;
- PFT1000_INFO info;
+ struct ft1000_info *info;
struct ft1000_device *ft1000dev;
int result=0;
int cmd;
@@ -561,7 +561,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
//DEBUG("FT1000:ft1000_ChIoctl:Command = 0x%x Argument = 0x%8x\n", Command, (u32)Argument);
dev = File->private_data;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
ft1000dev = info->pFt1000Dev;
cmd = _IOC_NR(Command);
//DEBUG("FT1000:ft1000_ChIoctl:cmd = 0x%x\n", cmd);
@@ -893,7 +893,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
//---------------------------------------------------------------------------
static int ft1000_ChRelease (struct inode *Inode, struct file *File)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
struct net_device *dev;
int i;
struct dpram_blk *pdpram_blk;
@@ -901,7 +901,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)
DEBUG("ft1000_ChRelease called\n");
dev = File->private_data;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
if (ft1000_flarion_cnt == 0) {
info->appcnt--;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index ee32f40..4dd456f 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -205,7 +205,7 @@ static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_val
USHORT handshake;
int loopcnt;
ULONG status=0;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
loopcnt = 0;
while (loopcnt < 100)
@@ -294,7 +294,7 @@ static USHORT get_handshake_usb(struct ft1000_device *ft1000dev, USHORT expected
USHORT temp;
ULONG status=0;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
loopcnt = 0;
handshake = 0;
while (loopcnt < 100)
@@ -352,7 +352,7 @@ static USHORT get_request_type(struct ft1000_device *ft1000dev)
ULONG status;
USHORT tempword;
ULONG tempx;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1)
{
@@ -380,7 +380,7 @@ static USHORT get_request_type_usb(struct ft1000_device *ft1000dev)
ULONG status;
USHORT tempword;
ULONG tempx;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1)
{
status = fix_ft1000_read_dpram32 (ft1000dev, DWNLD_MAG1_TYPE_LOC, (PUCHAR)&tempx);
@@ -423,7 +423,7 @@ static long get_request_value(struct ft1000_device *ft1000dev)
ULONG value;
USHORT tempword;
ULONG status;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1)
@@ -452,7 +452,7 @@ static long get_request_value_usb(struct ft1000_device *ft1000dev)
ULONG value;
USHORT tempword;
ULONG status;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info * pft1000info = netdev_priv(ft1000dev->net);
if (pft1000info->usbboot == 2) {
value = pft1000info->tempbuf[4];
@@ -556,7 +556,7 @@ static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, UCHAR
USHORT tempword;
USHORT tempbuffer[64];
USHORT resultbuffer[64];
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
//DEBUG("FT1000:download:start word_length = %d\n",(int)word_length);
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC;
@@ -801,7 +801,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
USHORT dpram = 0;
PUCHAR pbuffer;
struct prov_record *pprov_record;
- FT1000_INFO *pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
DEBUG("Entered scram_dnldr...\n");
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index f8ca086..4c77d2c 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -32,7 +32,7 @@
//#define JDEBUG
static int ft1000_reset(struct net_device *ft1000dev);
-static int ft1000_submit_rx_urb(PFT1000_INFO info);
+static int ft1000_submit_rx_urb(struct ft1000_info *info);
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int ft1000_open (struct net_device *dev);
static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev);
@@ -625,7 +625,7 @@ int dsp_reload(struct ft1000_device *ft1000dev)
USHORT tempword;
ULONG templong;
- PFT1000_INFO pft1000info;
+ struct ft1000_info *pft1000info;
pft1000info = netdev_priv(ft1000dev->net);
@@ -679,7 +679,7 @@ int dsp_reload(struct ft1000_device *ft1000dev)
//---------------------------------------------------------------------------
static void ft1000_reset_asic (struct net_device *dev)
{
- FT1000_INFO *info = netdev_priv(dev);
+ struct ft1000_info *info = netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
u16 tempword;
@@ -719,7 +719,7 @@ static void ft1000_reset_asic (struct net_device *dev)
//---------------------------------------------------------------------------
static int ft1000_reset_card (struct net_device *dev)
{
- FT1000_INFO *info = netdev_priv(dev);
+ struct ft1000_info *info = netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
u16 tempword;
struct prov_record *ptr;
@@ -797,7 +797,7 @@ static const struct net_device_ops ftnet_ops =
u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
{
struct net_device *netdev;
- FT1000_INFO *pInfo = NULL;
+ struct ft1000_info *pInfo = NULL;
struct dpram_blk *pdpram_blk;
int i, ret_val;
struct list_head *cur, *tmp;
@@ -808,18 +808,18 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
DEBUG("Enter init_ft1000_netdev...\n");
- netdev = alloc_etherdev( sizeof(FT1000_INFO));
+ netdev = alloc_etherdev(sizeof(struct ft1000_info));
if (!netdev )
{
DEBUG("init_ft1000_netdev: can not allocate network device\n");
return -ENOMEM;
}
- pInfo = (FT1000_INFO *) netdev_priv (netdev);
+ pInfo = (struct ft1000_info *) netdev_priv(netdev);
//DEBUG("init_ft1000_netdev: gFt1000Info=%x, netdev=%x, ft1000dev=%x\n", gFt1000Info, netdev, ft1000dev);
- memset (pInfo, 0, sizeof(FT1000_INFO));
+ memset(pInfo, 0, sizeof(struct ft1000_info));
dev_alloc_name(netdev, netdev->name);
@@ -961,7 +961,7 @@ err_net:
int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf)
{
struct net_device *netdev;
- FT1000_INFO *pInfo;
+ struct ft1000_info *pInfo;
int rc;
netdev = ft1000dev->net;
@@ -1171,7 +1171,7 @@ static inline u16 ft1000_read_fifo_len (struct net_device *dev)
u16 temp;
u16 ret;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
// DEBUG("ft1000_read_fifo_len: enter ft1000dev %x\n", ft1000dev); //aelias [-] reason: warning: format ???%x??? expects type ???unsigned int???, but argument 2 has type ???struct ft1000_device *???
DEBUG("ft1000_read_fifo_len: enter ft1000dev %p\n", ft1000dev); //aelias [+] reason: up
@@ -1217,7 +1217,7 @@ static inline u16 ft1000_read_fifo_len (struct net_device *dev)
//---------------------------------------------------------------------------
static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
{
- FT1000_INFO *pInfo = netdev_priv(netdev);
+ struct ft1000_info *pInfo = netdev_priv(netdev);
struct ft1000_device *pFt1000Dev = pInfo->pFt1000Dev;
@@ -1322,7 +1322,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
//---------------------------------------------------------------------------
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- FT1000_INFO *pInfo = netdev_priv(dev);
+ struct ft1000_info *pInfo = netdev_priv(dev);
struct ft1000_device *pFt1000Dev= pInfo->pFt1000Dev;
u8 *pdata;
int maxlen, pipe;
@@ -1398,7 +1398,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
//---------------------------------------------------------------------------
static int ft1000_copy_up_pkt (struct urb *urb)
{
- PFT1000_INFO info = urb->context;
+ struct ft1000_info *info = urb->context;
struct ft1000_device *ft1000dev = info->pFt1000Dev;
struct net_device *net = ft1000dev->net;
@@ -1512,7 +1512,7 @@ static int ft1000_copy_up_pkt (struct urb *urb)
// SUCCESS
//
//---------------------------------------------------------------------------
-static int ft1000_submit_rx_urb(PFT1000_INFO info)
+static int ft1000_submit_rx_urb(struct ft1000_info *info)
{
int result;
struct ft1000_device *pFt1000Dev = info->pFt1000Dev;
@@ -1562,7 +1562,7 @@ static int ft1000_submit_rx_urb(PFT1000_INFO info)
//---------------------------------------------------------------------------
static int ft1000_open (struct net_device *dev)
{
- FT1000_INFO *pInfo = (FT1000_INFO *)netdev_priv(dev);
+ struct ft1000_info *pInfo = (struct ft1000_info *)netdev_priv(dev);
struct timeval tv; //mbelian
DEBUG("ft1000_open is called for card %d\n", pInfo->CardNumber);
@@ -1601,7 +1601,7 @@ static int ft1000_open (struct net_device *dev)
//---------------------------------------------------------------------------
int ft1000_close(struct net_device *net)
{
- FT1000_INFO *pInfo = (FT1000_INFO *) netdev_priv (net);
+ struct ft1000_info *pInfo = (struct ft1000_info *) netdev_priv(net);
struct ft1000_device *ft1000dev = pInfo->pFt1000Dev;
//DEBUG ("ft1000_close: netdev->refcnt=%d\n", net->refcnt);
@@ -1624,7 +1624,7 @@ int ft1000_close(struct net_device *net)
static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev)
{
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev);
return &(info->stats); //mbelian
}
@@ -1650,7 +1650,7 @@ Jim
static int ft1000_chkcard (struct ft1000_device *dev) {
u16 tempword;
u16 status;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
if (info->fCondResetPend)
{
@@ -1750,7 +1750,7 @@ static BOOLEAN ft1000_receive_cmd (struct ft1000_device *dev, u16 *pbuffer, int
static int ft1000_dsp_prov(void *arg)
{
struct ft1000_device *dev = (struct ft1000_device *)arg;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
u16 tempword;
u16 len;
u16 i=0;
@@ -1833,7 +1833,7 @@ static int ft1000_dsp_prov(void *arg)
static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
u16 msgtype;
u16 tempword;
struct media_msg *pmediamsg;
@@ -2116,7 +2116,7 @@ out:
int ft1000_poll(void* dev_id) {
struct ft1000_device *dev = (struct ft1000_device *)dev_id;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
u16 tempword;
u16 status;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
index d1ef396..36cdd58 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
@@ -52,7 +52,7 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof,
unsigned short ledStat;
unsigned short conStat;
- FT1000_INFO *info;
+ struct ft1000_info *info;
char *status[] = { "Idle (Disconnect)", "Searching", "Active (Connected)",
"Waiting for L2", "Sleep", "No Coverage", "", ""
@@ -65,7 +65,7 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof,
time_t delta;
dev = (struct net_device *) data;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
if (off > 0)
{
@@ -169,10 +169,10 @@ static int
ft1000NotifyProc (struct notifier_block *this, unsigned long event, void *ptr)
{
struct net_device *dev = ptr;
- FT1000_INFO *info;
+ struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file;
- info = (FT1000_INFO *) netdev_priv (dev);
+info = (struct ft1000_info *) netdev_priv(dev);
switch (event)
@@ -196,9 +196,9 @@ static struct notifier_block ft1000_netdev_notifier = {
void
ft1000InitProc (struct net_device *dev)
{
- FT1000_INFO *info;
+ struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
info->ft1000_proc_dir = proc_mkdir (FT1000_PROC_DIR, FTNET_PROC);
@@ -222,7 +222,7 @@ ft1000InitProc (struct net_device *dev)
}
void
-ft1000CleanupProc (FT1000_INFO * info)
+ft1000CleanupProc(struct ft1000_info *info)
{
remove_proc_entry (info->netdevname, info->ft1000_proc_dir);
remove_proc_entry (FT1000_PROC_DIR, FTNET_PROC);
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index 5fae954..28f55b2 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -64,7 +64,7 @@ static int ft1000_probe(struct usb_interface *interface,
int i, ret = 0, size;
struct ft1000_device *ft1000dev;
- FT1000_INFO *pft1000info;
+ struct ft1000_info *pft1000info;
const struct firmware *dsp_fw;
ft1000dev = kmalloc(sizeof(struct ft1000_device), GFP_KERNEL);
@@ -164,7 +164,7 @@ static int ft1000_probe(struct usb_interface *interface,
if (ret)
goto err_load;
- pft1000info = (FT1000_INFO *) netdev_priv(ft1000dev->net);
+ pft1000info = (struct ft1000_info *) netdev_priv(ft1000dev->net);
DEBUG("In probe: pft1000info=%p\n", pft1000info);
ret = dsp_reload(ft1000dev);
@@ -210,11 +210,11 @@ err_fw:
static void ft1000_disconnect(struct usb_interface *interface)
{
- FT1000_INFO *pft1000info;
+ struct ft1000_info *pft1000info;
DEBUG("ft1000_disconnect is called\n");
- pft1000info = (PFT1000_INFO) usb_get_intfdata(interface);
+ pft1000info = (struct ft1000_info *) usb_get_intfdata(interface);
DEBUG("In disconnect pft1000info=%p\n", pft1000info);
if (pft1000info) {
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index e3ecbea..37d9e46 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -486,7 +486,7 @@ struct ft1000_device
// struct net_device_stats stats; //mbelian
} __attribute__ ((packed));
-typedef struct _FT1000_INFO {
+struct ft1000_info {
struct ft1000_device *pFt1000Dev;
struct net_device_stats stats;
@@ -558,7 +558,7 @@ typedef struct _FT1000_INFO {
unsigned short tempbuf[32];
char netdevname[IFNAMSIZ];
struct proc_dir_entry *ft1000_proc_dir; //mbelian
-} FT1000_INFO, *PFT1000_INFO;
+};
struct dpram_blk {
@@ -601,7 +601,7 @@ int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
int ft1000_poll(void* dev_id);
void ft1000InitProc(struct net_device *dev);
-void ft1000CleanupProc(FT1000_INFO *info);
+void ft1000CleanupProc(struct ft1000_info *info);
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 7/7] staging: ft1000: Remove FT1000_INFO typedef usage.
2010-10-15 12:13 ` [PATCH 7/7] staging:ft1000: Remove FT1000_INFO " Marek Belisko
@ 2010-10-15 19:40 ` Greg KH
2010-10-15 20:16 ` Belisko Marek
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2010-10-15 19:40 UTC (permalink / raw)
To: Marek Belisko; +Cc: Greg Kroah-Hartman, devel, linux-kernel
On Fri, Oct 15, 2010 at 02:13:04PM +0200, Marek Belisko wrote:
> Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
> ---
> drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++-------
> .../staging/ft1000/ft1000-usb/ft1000_download.c | 16 ++++----
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 42 ++++++++++----------
> drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++---
> drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++--
> drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +-
> 6 files changed, 57 insertions(+), 57 deletions(-)
Something's wrong with this patch. There was also something wrong with
one of the previous ones as well, but I fixed it up by hand. It seems
that you forgot to send one of the patches in this series, which caused
this one to throw a lot of rejects.
Care to resync on my tree to see what I haven't applied from you and
resend this one, and anything else I've missed?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 7/7] staging: ft1000: Remove FT1000_INFO typedef usage.
2010-10-15 19:40 ` [PATCH 7/7] staging: ft1000: " Greg KH
@ 2010-10-15 20:16 ` Belisko Marek
2010-10-15 21:12 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Belisko Marek @ 2010-10-15 20:16 UTC (permalink / raw)
To: Greg KH; +Cc: Greg Kroah-Hartman, devel, linux-kernel
On Fri, Oct 15, 2010 at 9:40 PM, Greg KH <greg@kroah.com> wrote:
> On Fri, Oct 15, 2010 at 02:13:04PM +0200, Marek Belisko wrote:
>> Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
>> ---
>> drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++-------
>> .../staging/ft1000/ft1000-usb/ft1000_download.c | 16 ++++----
>> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 42 ++++++++++----------
>> drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++---
>> drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++--
>> drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +-
>> 6 files changed, 57 insertions(+), 57 deletions(-)
>
> Something's wrong with this patch. There was also something wrong with
> one of the previous ones as well, but I fixed it up by hand. It seems
> that you forgot to send one of the patches in this series, which caused
> this one to throw a lot of rejects.
>
> Care to resync on my tree to see what I haven't applied from you and
> resend this one, and anything else I've missed?
I forgot to send 1 patch if I check my git logs. I already send it
([PATCH] staging:ft1000: Remove dead code from ft1000_hw.c).
Hopefully it resolved all problems with patch applying.
Sorry.
>
> thanks,
>
> greg k-h
>
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 7/7] staging: ft1000: Remove FT1000_INFO typedef usage.
2010-10-15 20:16 ` Belisko Marek
@ 2010-10-15 21:12 ` Greg KH
0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2010-10-15 21:12 UTC (permalink / raw)
To: Belisko Marek; +Cc: Greg Kroah-Hartman, devel, linux-kernel
On Fri, Oct 15, 2010 at 10:16:06PM +0200, Belisko Marek wrote:
> On Fri, Oct 15, 2010 at 9:40 PM, Greg KH <greg@kroah.com> wrote:
> > On Fri, Oct 15, 2010 at 02:13:04PM +0200, Marek Belisko wrote:
> >> Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
> >> ---
> >> drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++-------
> >> .../staging/ft1000/ft1000-usb/ft1000_download.c | 16 ++++----
> >> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 42 ++++++++++----------
> >> drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++---
> >> drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++--
> >> drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +-
> >> 6 files changed, 57 insertions(+), 57 deletions(-)
> >
> > Something's wrong with this patch. There was also something wrong with
> > one of the previous ones as well, but I fixed it up by hand. It seems
> > that you forgot to send one of the patches in this series, which caused
> > this one to throw a lot of rejects.
> >
> > Care to resync on my tree to see what I haven't applied from you and
> > resend this one, and anything else I've missed?
> I forgot to send 1 patch if I check my git logs. I already send it
> ([PATCH] staging:ft1000: Remove dead code from ft1000_hw.c).
>
> Hopefully it resolved all problems with patch applying.
No, that one doesn't apply either :(
Care to retry?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread