patch-2.3.14 linux/drivers/net/com90io.c

Next file: linux/drivers/net/com90xx.c
Previous file: linux/drivers/net/com20020.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.13/linux/drivers/net/com90io.c linux/drivers/net/com90io.c
@@ -58,22 +58,22 @@
 
 /* Internal function declarations */
 
-static int arc90io_probe(struct device *dev);
-static void arc90io_rx(struct device *dev,int recbuf);
-static int arc90io_found(struct device *dev,int ioaddr,int airq);
-static void arc90io_inthandler (struct device *dev);
-static int arc90io_reset (struct device *dev, int reset_delay);
-static void arc90io_setmask (struct device *dev, u_char mask);
-static void arc90io_command (struct device *dev, u_char command);
-static u_char arc90io_status (struct device *dev);
-static void arc90io_prepare_tx(struct device *dev,u_char *hdr,int hdrlen,
+static int arc90io_probe(struct net_device *dev);
+static void arc90io_rx(struct net_device *dev,int recbuf);
+static int arc90io_found(struct net_device *dev,int ioaddr,int airq);
+static void arc90io_inthandler (struct net_device *dev);
+static int arc90io_reset (struct net_device *dev, int reset_delay);
+static void arc90io_setmask (struct net_device *dev, u_char mask);
+static void arc90io_command (struct net_device *dev, u_char command);
+static u_char arc90io_status (struct net_device *dev);
+static void arc90io_prepare_tx(struct net_device *dev,u_char *hdr,int hdrlen,
        		      char *data,int length,int daddr,int exceptA, int offset);
 static  void arc90io_openclose(int open);
 
-static u_char get_buffer_byte (struct device *dev, unsigned offset);
-static void put_buffer_byte (struct device *dev, unsigned offset, u_char datum);
-static void get_whole_buffer (struct device *dev, unsigned offset, unsigned length, char *dest);
-static void put_whole_buffer (struct device *dev, unsigned offset, unsigned length, char *dest);
+static u_char get_buffer_byte (struct net_device *dev, unsigned offset);
+static void put_buffer_byte (struct net_device *dev, unsigned offset, u_char datum);
+static void get_whole_buffer (struct net_device *dev, unsigned offset, unsigned length, char *dest);
+static void put_whole_buffer (struct net_device *dev, unsigned offset, unsigned length, char *dest);
 
 
 /* Module parameters */
@@ -88,7 +88,7 @@
 MODULE_PARM(device, "s");
 #else
 void __init com90io_setup (char *str, int *ints);
-extern struct device arcnet_devs[];
+extern struct net_device arcnet_devs[];
 extern char arcnet_dev_names[][10];
 extern int arcnet_num_devs;
 #endif
@@ -124,7 +124,7 @@
  *                                                                          *
  ****************************************************************************/
 
-u_char get_buffer_byte (struct device *dev, unsigned offset)
+u_char get_buffer_byte (struct net_device *dev, unsigned offset)
 {
   int ioaddr=dev->base_addr;
 
@@ -134,7 +134,7 @@
   return inb(_MEMDATA);
 }
 
-void put_buffer_byte (struct device *dev, unsigned offset, u_char datum)
+void put_buffer_byte (struct net_device *dev, unsigned offset, u_char datum)
 {
   int ioaddr=dev->base_addr;
 
@@ -148,7 +148,7 @@
 #undef ONE_AT_A_TIME_TX
 #undef ONE_AT_A_TIME_RX
 
-void get_whole_buffer (struct device *dev, unsigned offset, unsigned length, char *dest)
+void get_whole_buffer (struct net_device *dev, unsigned offset, unsigned length, char *dest)
 {
   int ioaddr=dev->base_addr;
 
@@ -163,7 +163,7 @@
 #endif
 }
 
-void put_whole_buffer (struct device *dev, unsigned offset, unsigned length, char *dest)
+void put_whole_buffer (struct net_device *dev, unsigned offset, unsigned length, char *dest)
 {
   int ioaddr=dev->base_addr;
 
@@ -193,7 +193,7 @@
  * it's where we were told it was, and even autoirq
  */
 
-int __init arc90io_probe(struct device *dev)
+int __init arc90io_probe(struct net_device *dev)
 {
   int ioaddr=dev->base_addr,status,delayval;
   unsigned long airqmask;
@@ -284,10 +284,10 @@
 }
 
 
-/* Set up the struct device associated with this card.  Called after
+/* Set up the struct net_device associated with this card.  Called after
  * probing succeeds.
  */
-int __init arc90io_found(struct device *dev,int ioaddr,int airq)
+int __init arc90io_found(struct net_device *dev,int ioaddr,int airq)
 {
   struct arcnet_local *lp;
 
@@ -381,7 +381,7 @@
  *
  * However, it does make sure the card is in a defined state.
  */
-int arc90io_reset(struct device *dev,int reset_delay)
+int arc90io_reset(struct net_device *dev,int reset_delay)
 {
   struct arcnet_local *lp=(struct arcnet_local *)dev->priv;
   short ioaddr=dev->base_addr;
@@ -453,21 +453,21 @@
 }
 
 
-static void arc90io_setmask(struct device *dev, u_char mask)
+static void arc90io_setmask(struct net_device *dev, u_char mask)
 {
   short ioaddr=dev->base_addr;
 
   AINTMASK(mask);
 }
 
-static u_char arc90io_status(struct device *dev)
+static u_char arc90io_status(struct net_device *dev)
 {
   short ioaddr=dev->base_addr;
 
   return ARCSTATUS;
 }
 
-static void arc90io_command(struct device *dev, u_char cmd)
+static void arc90io_command(struct net_device *dev, u_char cmd)
 {
   short ioaddr=dev->base_addr;
 
@@ -479,7 +479,7 @@
  * by the card.
  */
 static void
-arc90io_inthandler(struct device *dev)
+arc90io_inthandler(struct net_device *dev)
 {
   struct arcnet_local *lp=(struct arcnet_local *)dev->priv;
   int ioaddr=dev->base_addr, status, boguscount = 3, didsomething;
@@ -711,7 +711,7 @@
  */
 
 static void
-arc90io_rx(struct device *dev,int recbuf)
+arc90io_rx(struct net_device *dev,int recbuf)
 {
   struct arcnet_local *lp = (struct arcnet_local *)dev->priv;
   int ioaddr=dev->base_addr;
@@ -768,7 +768,7 @@
  * by arcnet_go_tx.
  */
 static void
-arc90io_prepare_tx(struct device *dev,u_char *hdr,int hdrlen,
+arc90io_prepare_tx(struct net_device *dev,u_char *hdr,int hdrlen,
 		    char *data,int length,int daddr,int exceptA, int offset)
 {
   struct arcnet_local *lp = (struct arcnet_local *)dev->priv;
@@ -840,19 +840,19 @@
 
 #ifdef MODULE
 
-static struct device *cards[16]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
+static struct net_device *cards[16]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
 			  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
 
 
 int init_module(void)
 {
-  struct device *dev=cards[0];
+  struct net_device *dev=cards[0];
 
-  cards[0]=dev=(struct device *)kmalloc(sizeof(struct device), GFP_KERNEL);
+  cards[0]=dev=(struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL);
   if (!dev)
     return -ENOMEM;
 
-  memset(dev, 0, sizeof(struct device));
+  memset(dev, 0, sizeof(struct net_device));
 
   dev->name=(char *)kmalloc(9, GFP_KERNEL);
   if (!dev->name)
@@ -881,7 +881,7 @@
 
 void cleanup_module(void)
 {
-  struct device *dev=cards[0];
+  struct net_device *dev=cards[0];
   int ioaddr=dev->base_addr;
 
   if (dev->start) (*dev->stop)(dev);
@@ -916,7 +916,7 @@
 
 void __init com90io_setup (char *str, int *ints)
 {
-  struct device *dev;
+  struct net_device *dev;
 
   if (arcnet_num_devs == MAX_ARCNET_DEVS)
     {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)