Commit e33196e1 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

drivers/staging: Remove unnecessary casts of netdev_priv

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 345594d6
...@@ -132,7 +132,7 @@ inline void ft1000_asic_write(struct net_device *dev, u16 offset, u16 value) ...@@ -132,7 +132,7 @@ inline void ft1000_asic_write(struct net_device *dev, u16 offset, u16 value)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static inline u16 ft1000_read_fifo_len(struct net_device *dev) static inline u16 ft1000_read_fifo_len(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
return (ft1000_read_reg(dev, FT1000_REG_UFIFO_STAT) - 16); return (ft1000_read_reg(dev, FT1000_REG_UFIFO_STAT) - 16);
...@@ -155,7 +155,7 @@ static inline u16 ft1000_read_fifo_len(struct net_device *dev) ...@@ -155,7 +155,7 @@ static inline u16 ft1000_read_fifo_len(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_read_dpram(struct net_device * dev, int offset) u16 ft1000_read_dpram(struct net_device * dev, int offset)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
unsigned long flags; unsigned long flags;
u16 data; u16 data;
...@@ -184,7 +184,7 @@ u16 ft1000_read_dpram(struct net_device * dev, int offset) ...@@ -184,7 +184,7 @@ u16 ft1000_read_dpram(struct net_device * dev, int offset)
static inline void ft1000_write_dpram(struct net_device *dev, static inline void ft1000_write_dpram(struct net_device *dev,
int offset, u16 value) int offset, u16 value)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
unsigned long flags; unsigned long flags;
// Provide mutual exclusive access while reading ASIC registers. // Provide mutual exclusive access while reading ASIC registers.
...@@ -208,7 +208,7 @@ static inline void ft1000_write_dpram(struct net_device *dev, ...@@ -208,7 +208,7 @@ static inline void ft1000_write_dpram(struct net_device *dev,
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index) u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
unsigned long flags; unsigned long flags;
u16 data; u16 data;
...@@ -242,7 +242,7 @@ u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index) ...@@ -242,7 +242,7 @@ u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index)
static inline void ft1000_write_dpram_mag_16(struct net_device *dev, static inline void ft1000_write_dpram_mag_16(struct net_device *dev,
int offset, u16 value, int Index) int offset, u16 value, int Index)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
unsigned long flags; unsigned long flags;
// Provide mutual exclusive access while reading ASIC registers. // Provide mutual exclusive access while reading ASIC registers.
...@@ -270,7 +270,7 @@ static inline void ft1000_write_dpram_mag_16(struct net_device *dev, ...@@ -270,7 +270,7 @@ static inline void ft1000_write_dpram_mag_16(struct net_device *dev,
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset) u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
unsigned long flags; unsigned long flags;
u32 data; u32 data;
...@@ -298,7 +298,7 @@ u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset) ...@@ -298,7 +298,7 @@ u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value) void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
unsigned long flags; unsigned long flags;
// Provide mutual exclusive access while reading ASIC registers. // Provide mutual exclusive access while reading ASIC registers.
...@@ -320,7 +320,7 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value) ...@@ -320,7 +320,7 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void ft1000_enable_interrupts(struct net_device *dev) static void ft1000_enable_interrupts(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 tempword; u16 tempword;
DEBUG(1, "ft1000_hw:ft1000_enable_interrupts()\n"); DEBUG(1, "ft1000_hw:ft1000_enable_interrupts()\n");
...@@ -345,7 +345,7 @@ static void ft1000_enable_interrupts(struct net_device *dev) ...@@ -345,7 +345,7 @@ static void ft1000_enable_interrupts(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void ft1000_disable_interrupts(struct net_device *dev) static void ft1000_disable_interrupts(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 tempword; u16 tempword;
DEBUG(1, "ft1000_hw: ft1000_disable_interrupts()\n"); DEBUG(1, "ft1000_hw: ft1000_disable_interrupts()\n");
...@@ -370,7 +370,7 @@ static void ft1000_disable_interrupts(struct net_device *dev) ...@@ -370,7 +370,7 @@ static void ft1000_disable_interrupts(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void ft1000_reset_asic(struct net_device *dev) static void ft1000_reset_asic(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 tempword; u16 tempword;
DEBUG(1, "ft1000_hw:ft1000_reset_asic called\n"); DEBUG(1, "ft1000_hw:ft1000_reset_asic called\n");
...@@ -414,7 +414,7 @@ static void ft1000_reset_asic(struct net_device *dev) ...@@ -414,7 +414,7 @@ static void ft1000_reset_asic(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static int ft1000_reset_card(struct net_device *dev) static int ft1000_reset_card(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 tempword; u16 tempword;
int i; int i;
unsigned long flags; unsigned long flags;
...@@ -618,7 +618,7 @@ static void ft1000_hbchk(u_long data) ...@@ -618,7 +618,7 @@ static void ft1000_hbchk(u_long data)
FT1000_INFO *info; FT1000_INFO *info;
USHORT tempword; USHORT tempword;
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
if (info->CardReady == 1) { if (info->CardReady == 1) {
// Perform dsp heartbeat check // Perform dsp heartbeat check
...@@ -831,7 +831,7 @@ static void ft1000_hbchk(u_long data) ...@@ -831,7 +831,7 @@ static void ft1000_hbchk(u_long data)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qtype) void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qtype)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
int i; int i;
u16 tempword; u16 tempword;
unsigned long flags; unsigned long flags;
...@@ -916,7 +916,7 @@ void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qt ...@@ -916,7 +916,7 @@ void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qt
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
BOOLEAN ft1000_receive_cmd(struct net_device *dev, u16 * pbuffer, int maxsz, u16 *pnxtph) BOOLEAN ft1000_receive_cmd(struct net_device *dev, u16 * pbuffer, int maxsz, u16 *pnxtph)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 size; u16 size;
u16 *ppseudohdr; u16 *ppseudohdr;
int i; int i;
...@@ -1009,7 +1009,7 @@ BOOLEAN ft1000_receive_cmd(struct net_device *dev, u16 * pbuffer, int maxsz, u16 ...@@ -1009,7 +1009,7 @@ BOOLEAN ft1000_receive_cmd(struct net_device *dev, u16 * pbuffer, int maxsz, u16
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void ft1000_proc_drvmsg(struct net_device *dev) void ft1000_proc_drvmsg(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 msgtype; u16 msgtype;
u16 tempword; u16 tempword;
PMEDIAMSG pmediamsg; PMEDIAMSG pmediamsg;
...@@ -1292,7 +1292,7 @@ void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1292,7 +1292,7 @@ void ft1000_proc_drvmsg(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ft1000_parse_dpram_msg(struct net_device *dev) int ft1000_parse_dpram_msg(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 doorbell; u16 doorbell;
u16 portid; u16 portid;
u16 nxtph; u16 nxtph;
...@@ -1449,7 +1449,7 @@ int ft1000_parse_dpram_msg(struct net_device *dev) ...@@ -1449,7 +1449,7 @@ int ft1000_parse_dpram_msg(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum) static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 i; u16 i;
u32 templong; u32 templong;
u16 tempword; u16 tempword;
...@@ -1596,7 +1596,7 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum) ...@@ -1596,7 +1596,7 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
int ft1000_copy_up_pkt(struct net_device *dev) int ft1000_copy_up_pkt(struct net_device *dev)
{ {
u16 tempword; u16 tempword;
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 len; u16 len;
struct sk_buff *skb; struct sk_buff *skb;
u16 i; u16 i;
...@@ -1783,7 +1783,7 @@ int ft1000_copy_up_pkt(struct net_device *dev) ...@@ -1783,7 +1783,7 @@ int ft1000_copy_up_pkt(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len) int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
union { union {
PSEUDO_HDR blk; PSEUDO_HDR blk;
u16 buff[sizeof(PSEUDO_HDR) >> 1]; u16 buff[sizeof(PSEUDO_HDR) >> 1];
...@@ -1943,7 +1943,7 @@ int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len) ...@@ -1943,7 +1943,7 @@ int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len)
static struct net_device_stats *ft1000_stats(struct net_device *dev) static struct net_device_stats *ft1000_stats(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
return (&info->stats); return (&info->stats);
} }
...@@ -1967,7 +1967,7 @@ static int ft1000_open(struct net_device *dev) ...@@ -1967,7 +1967,7 @@ static int ft1000_open(struct net_device *dev)
static int ft1000_close(struct net_device *dev) static int ft1000_close(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
DEBUG(0, "ft1000_hw: ft1000_close()\n"); DEBUG(0, "ft1000_hw: ft1000_close()\n");
...@@ -1989,7 +1989,7 @@ static int ft1000_close(struct net_device *dev) ...@@ -1989,7 +1989,7 @@ static int ft1000_close(struct net_device *dev)
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev) static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u8 *pdata; u8 *pdata;
DEBUG(1, "ft1000_hw: ft1000_start_xmit()\n"); DEBUG(1, "ft1000_hw: ft1000_start_xmit()\n");
...@@ -2026,7 +2026,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2026,7 +2026,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
static irqreturn_t ft1000_interrupt(int irq, void *dev_id) static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
{ {
struct net_device *dev = (struct net_device *)dev_id; struct net_device *dev = (struct net_device *)dev_id;
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
u16 tempword; u16 tempword;
u16 inttype; u16 inttype;
int cnt; int cnt;
...@@ -2091,7 +2091,7 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id) ...@@ -2091,7 +2091,7 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
void stop_ft1000_card(struct net_device *dev) void stop_ft1000_card(struct net_device *dev)
{ {
FT1000_INFO *info = (FT1000_INFO *) netdev_priv(dev); FT1000_INFO *info = netdev_priv(dev);
PPROV_RECORD ptr; PPROV_RECORD ptr;
// int cnt; // int cnt;
...@@ -2127,7 +2127,7 @@ static void ft1000_get_drvinfo(struct net_device *dev, ...@@ -2127,7 +2127,7 @@ static void ft1000_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
FT1000_INFO *ft_info; FT1000_INFO *ft_info;
ft_info = (FT1000_INFO *) netdev_priv(dev); ft_info = netdev_priv(dev);
snprintf(info->driver, 32, "ft1000"); snprintf(info->driver, 32, "ft1000");
snprintf(info->bus_info, ETHTOOL_BUSINFO_LEN, "PCMCIA 0x%lx", snprintf(info->bus_info, ETHTOOL_BUSINFO_LEN, "PCMCIA 0x%lx",
...@@ -2139,7 +2139,7 @@ static void ft1000_get_drvinfo(struct net_device *dev, ...@@ -2139,7 +2139,7 @@ static void ft1000_get_drvinfo(struct net_device *dev,
static u32 ft1000_get_link(struct net_device *dev) static u32 ft1000_get_link(struct net_device *dev)
{ {
FT1000_INFO *info; FT1000_INFO *info;
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
return info->mediastate; return info->mediastate;
} }
...@@ -2185,7 +2185,7 @@ struct net_device *init_ft1000_card(unsigned short irq, int port, ...@@ -2185,7 +2185,7 @@ struct net_device *init_ft1000_card(unsigned short irq, int port,
} }
SET_NETDEV_DEV(dev, fdev); SET_NETDEV_DEV(dev, fdev);
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
memset(info, 0, sizeof(FT1000_INFO)); memset(info, 0, sizeof(FT1000_INFO));
......
...@@ -65,7 +65,7 @@ int ft1000ReadProc(char *page, char **start, off_t off, ...@@ -65,7 +65,7 @@ int ft1000ReadProc(char *page, char **start, off_t off,
time_t delta; time_t delta;
dev = (struct net_device *)data; dev = (struct net_device *)data;
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
if (off > 0) { if (off > 0) {
*eof = 1; *eof = 1;
...@@ -174,7 +174,7 @@ static int ft1000NotifyProc(struct notifier_block *this, unsigned long event, ...@@ -174,7 +174,7 @@ static int ft1000NotifyProc(struct notifier_block *this, unsigned long event,
struct net_device *dev = ptr; struct net_device *dev = ptr;
FT1000_INFO *info; FT1000_INFO *info;
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
switch (event) { switch (event) {
case NETDEV_CHANGENAME: case NETDEV_CHANGENAME:
...@@ -195,7 +195,7 @@ void ft1000InitProc(struct net_device *dev) ...@@ -195,7 +195,7 @@ void ft1000InitProc(struct net_device *dev)
{ {
FT1000_INFO *info; FT1000_INFO *info;
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
info->proc_ft1000 = proc_mkdir(FT1000_PROC, init_net.proc_net); info->proc_ft1000 = proc_mkdir(FT1000_PROC, init_net.proc_net);
create_proc_read_entry(dev->name, 0644, info->proc_ft1000, create_proc_read_entry(dev->name, 0644, info->proc_ft1000,
...@@ -208,7 +208,7 @@ void ft1000CleanupProc(struct net_device *dev) ...@@ -208,7 +208,7 @@ void ft1000CleanupProc(struct net_device *dev)
{ {
FT1000_INFO *info; FT1000_INFO *info;
info = (FT1000_INFO *) netdev_priv(dev); info = netdev_priv(dev);
remove_proc_entry(dev->name, info->proc_ft1000); remove_proc_entry(dev->name, info->proc_ft1000);
remove_proc_entry(FT1000_PROC, init_net.proc_net); remove_proc_entry(FT1000_PROC, init_net.proc_net);
......
...@@ -423,7 +423,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File) ...@@ -423,7 +423,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
if ( pdevobj[num] != NULL ) if ( pdevobj[num] != NULL )
//info = (struct ft1000_info *)(pdevobj[num]->net->priv); //info = (struct ft1000_info *)(pdevobj[num]->net->priv);
info = (struct ft1000_info *)netdev_priv(pdevobj[num]->net); info = netdev_priv(pdevobj[num]->net);
else else
{ {
DEBUG("ft1000_ChOpen: can not find device object %d\n", num); DEBUG("ft1000_ChOpen: can not find device object %d\n", num);
...@@ -488,7 +488,7 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait) ...@@ -488,7 +488,7 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
return (-EBADF); return (-EBADF);
} }
info = (struct ft1000_info *) netdev_priv(dev); info = netdev_priv(dev);
// Search for matching file object // Search for matching file object
for (i=0; i<MAX_NUM_APP; i++) { for (i=0; i<MAX_NUM_APP; i++) {
...@@ -560,7 +560,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command, ...@@ -560,7 +560,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); //DEBUG("FT1000:ft1000_ChIoctl:Command = 0x%x Argument = 0x%8x\n", Command, (u32)Argument);
dev = File->private_data; dev = File->private_data;
info = (struct ft1000_info *) netdev_priv(dev); info = netdev_priv(dev);
ft1000dev = info->pFt1000Dev; ft1000dev = info->pFt1000Dev;
cmd = _IOC_NR(Command); cmd = _IOC_NR(Command);
//DEBUG("FT1000:ft1000_ChIoctl:cmd = 0x%x\n", cmd); //DEBUG("FT1000:ft1000_ChIoctl:cmd = 0x%x\n", cmd);
...@@ -900,7 +900,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File) ...@@ -900,7 +900,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)
DEBUG("ft1000_ChRelease called\n"); DEBUG("ft1000_ChRelease called\n");
dev = File->private_data; dev = File->private_data;
info = (struct ft1000_info *) netdev_priv(dev); info = netdev_priv(dev);
if (ft1000_flarion_cnt == 0) { if (ft1000_flarion_cnt == 0) {
info->appcnt--; info->appcnt--;
......
...@@ -786,7 +786,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev) ...@@ -786,7 +786,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
return -ENOMEM; return -ENOMEM;
} }
pInfo = (struct ft1000_info *) netdev_priv(netdev); pInfo = netdev_priv(netdev);
//DEBUG("init_ft1000_netdev: gFt1000Info=%x, netdev=%x, ft1000dev=%x\n", gFt1000Info, netdev, ft1000dev); //DEBUG("init_ft1000_netdev: gFt1000Info=%x, netdev=%x, ft1000dev=%x\n", gFt1000Info, netdev, ft1000dev);
...@@ -1345,7 +1345,7 @@ static int ft1000_submit_rx_urb(struct ft1000_info *info) ...@@ -1345,7 +1345,7 @@ static int ft1000_submit_rx_urb(struct ft1000_info *info)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static int ft1000_open (struct net_device *dev) static int ft1000_open (struct net_device *dev)
{ {
struct ft1000_info *pInfo = (struct ft1000_info *)netdev_priv(dev); struct ft1000_info *pInfo = netdev_priv(dev);
struct timeval tv; //mbelian struct timeval tv; //mbelian
int ret; int ret;
...@@ -1386,7 +1386,7 @@ static int ft1000_open (struct net_device *dev) ...@@ -1386,7 +1386,7 @@ static int ft1000_open (struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ft1000_close(struct net_device *net) int ft1000_close(struct net_device *net)
{ {
struct ft1000_info *pInfo = (struct ft1000_info *) netdev_priv(net); struct ft1000_info *pInfo = netdev_priv(net);
struct ft1000_device *ft1000dev = pInfo->pFt1000Dev; struct ft1000_device *ft1000dev = pInfo->pFt1000Dev;
//DEBUG ("ft1000_close: netdev->refcnt=%d\n", net->refcnt); //DEBUG ("ft1000_close: netdev->refcnt=%d\n", net->refcnt);
...@@ -1409,7 +1409,7 @@ int ft1000_close(struct net_device *net) ...@@ -1409,7 +1409,7 @@ int ft1000_close(struct net_device *net)
static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev) static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = netdev_priv(dev);
return &(info->stats); //mbelian return &(info->stats); //mbelian
} }
...@@ -1435,7 +1435,7 @@ Jim ...@@ -1435,7 +1435,7 @@ Jim
static int ft1000_chkcard (struct ft1000_device *dev) { static int ft1000_chkcard (struct ft1000_device *dev) {
u16 tempword; u16 tempword;
u16 status; u16 status;
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net); struct ft1000_info *info = netdev_priv(dev->net);
if (info->fCondResetPend) if (info->fCondResetPend)
{ {
...@@ -1535,7 +1535,7 @@ static bool ft1000_receive_cmd (struct ft1000_device *dev, u16 *pbuffer, int max ...@@ -1535,7 +1535,7 @@ static bool ft1000_receive_cmd (struct ft1000_device *dev, u16 *pbuffer, int max
static int ft1000_dsp_prov(void *arg) static int ft1000_dsp_prov(void *arg)
{ {
struct ft1000_device *dev = (struct ft1000_device *)arg; struct ft1000_device *dev = (struct ft1000_device *)arg;
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net); struct ft1000_info *info = netdev_priv(dev->net);
u16 tempword; u16 tempword;
u16 len; u16 len;
u16 i=0; u16 i=0;
...@@ -1618,7 +1618,7 @@ static int ft1000_dsp_prov(void *arg) ...@@ -1618,7 +1618,7 @@ static int ft1000_dsp_prov(void *arg)
static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net); struct ft1000_info *info = netdev_priv(dev->net);
u16 msgtype; u16 msgtype;
u16 tempword; u16 tempword;
struct media_msg *pmediamsg; struct media_msg *pmediamsg;
...@@ -1901,7 +1901,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { ...@@ -1901,7 +1901,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
int ft1000_poll(void* dev_id) { int ft1000_poll(void* dev_id) {
struct ft1000_device *dev = (struct ft1000_device *)dev_id; struct ft1000_device *dev = (struct ft1000_device *)dev_id;
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net); struct ft1000_info *info = netdev_priv(dev->net);
u16 tempword; u16 tempword;
u16 status; u16 status;
......
...@@ -65,7 +65,7 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof, ...@@ -65,7 +65,7 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof,
time_t delta; time_t delta;
dev = (struct net_device *) data; dev = (struct net_device *) data;
info = (struct ft1000_info *) netdev_priv(dev); info = netdev_priv(dev);
if (off > 0) if (off > 0)
{ {
...@@ -172,7 +172,7 @@ ft1000NotifyProc (struct notifier_block *this, unsigned long event, void *ptr) ...@@ -172,7 +172,7 @@ ft1000NotifyProc (struct notifier_block *this, unsigned long event, void *ptr)
struct ft1000_info *info; struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file; struct proc_dir_entry *ft1000_proc_file;
info = (struct ft1000_info *) netdev_priv(dev); info = netdev_priv(dev);
switch (event) switch (event)
...@@ -198,7 +198,7 @@ ft1000InitProc (struct net_device *dev) ...@@ -198,7 +198,7 @@ ft1000InitProc (struct net_device *dev)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file; struct proc_dir_entry *ft1000_proc_file;
info = (struct ft1000_info *) netdev_priv(dev); info = netdev_priv(dev);
info->ft1000_proc_dir = proc_mkdir (FT1000_PROC_DIR, FTNET_PROC); info->ft1000_proc_dir = proc_mkdir (FT1000_PROC_DIR, FTNET_PROC);
......
...@@ -163,7 +163,7 @@ static int ft1000_probe(struct usb_interface *interface, ...@@ -163,7 +163,7 @@ static int ft1000_probe(struct usb_interface *interface,
if (ret) if (ret)
goto err_load; goto err_load;
pft1000info = (struct ft1000_info *) netdev_priv(ft1000dev->net); pft1000info = netdev_priv(ft1000dev->net);
DEBUG("In probe: pft1000info=%p\n", pft1000info); DEBUG("In probe: pft1000info=%p\n", pft1000info);
ret = dsp_reload(ft1000dev); ret = dsp_reload(ft1000dev);
......
...@@ -527,7 +527,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, ...@@ -527,7 +527,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
static void r871xu_dev_remove(struct usb_interface *pusb_intf) static void r871xu_dev_remove(struct usb_interface *pusb_intf)
{ {
struct net_device *pnetdev = usb_get_intfdata(pusb_intf); struct net_device *pnetdev = usb_get_intfdata(pusb_intf);
struct _adapter *padapter = (struct _adapter *)netdev_priv(pnetdev); struct _adapter *padapter = netdev_priv(pnetdev);
struct usb_device *udev = interface_to_usbdev(pusb_intf); struct usb_device *udev = interface_to_usbdev(pusb_intf);
if (padapter) { if (padapter) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment