Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220395
b: refs/heads/master
c: 1a88a06
h: refs/heads/master
i:
  220393: 7a51b4f
  220391: f526ad1
v: v3
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Oct 19, 2010
1 parent db4b2f5 commit 3919132
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e99c33d08ec605133693a9b61f22c0495fc2866
refs/heads/master: 1a88a068710910aa9a303bc061f405b0768fef80
28 changes: 14 additions & 14 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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) ;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand All @@ -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);
Expand Down Expand Up @@ -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");
Expand All @@ -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++) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -893,15 +893,15 @@ 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;

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--;
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");

Expand Down
42 changes: 21 additions & 21 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -623,7 +623,7 @@ int dsp_reload(struct ft1000_device *ft1000dev)
USHORT tempword;
ULONG templong;

PFT1000_INFO pft1000info;
struct ft1000_info *pft1000info;

pft1000info = netdev_priv(ft1000dev->net);

Expand Down Expand Up @@ -677,7 +677,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;

Expand Down Expand Up @@ -717,7 +717,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;
Expand Down Expand Up @@ -795,7 +795,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;
Expand All @@ -806,18 +806,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);

Expand Down Expand Up @@ -959,7 +959,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
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;
Expand Down Expand Up @@ -1169,7 +1169,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
Expand Down Expand Up @@ -1215,7 +1215,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;


Expand Down Expand Up @@ -1320,7 +1320,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;
Expand Down Expand Up @@ -1396,7 +1396,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;

Expand Down Expand Up @@ -1510,7 +1510,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;
Expand Down Expand Up @@ -1560,7 +1560,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);
Expand Down Expand Up @@ -1599,7 +1599,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);
Expand All @@ -1622,7 +1622,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
}
Expand All @@ -1648,7 +1648,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)
{
Expand Down Expand Up @@ -1748,7 +1748,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;
Expand Down Expand Up @@ -1831,7 +1831,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;
Expand Down Expand Up @@ -2114,7 +2114,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
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;
Expand Down
Loading

0 comments on commit 3919132

Please sign in to comment.