hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/ethernet/amd/sunlance.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* $Id: sunlance.c,v 1.112 2002/01/15 06:48:55 davem Exp $
23 * lance.c: Linux/Sparc/Lance driver
34 *
....@@ -93,10 +94,10 @@
9394 #include <linux/of.h>
9495 #include <linux/of_device.h>
9596 #include <linux/gfp.h>
97
+#include <linux/pgtable.h>
9698
9799 #include <asm/io.h>
98100 #include <asm/dma.h>
99
-#include <asm/pgtable.h>
100101 #include <asm/byteorder.h> /* Used by the checksum routines */
101102 #include <asm/idprom.h>
102103 #include <asm/prom.h>
....@@ -104,14 +105,9 @@
104105 #include <asm/irq.h>
105106
106107 #define DRV_NAME "sunlance"
107
-#define DRV_VERSION "2.02"
108108 #define DRV_RELDATE "8/24/03"
109109 #define DRV_AUTHOR "Miguel de Icaza (miguel@nuclecu.unam.mx)"
110110
111
-static char version[] =
112
- DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n";
113
-
114
-MODULE_VERSION(DRV_VERSION);
115111 MODULE_AUTHOR(DRV_AUTHOR);
116112 MODULE_DESCRIPTION("Sun Lance ethernet driver");
117113 MODULE_LICENSE("GPL");
....@@ -1096,7 +1092,7 @@
10961092 sbus_writeb(0, piobuf);
10971093 }
10981094
1099
-static void lance_tx_timeout(struct net_device *dev)
1095
+static void lance_tx_timeout(struct net_device *dev, unsigned int txqueue)
11001096 {
11011097 struct lance_private *lp = netdev_priv(dev);
11021098
....@@ -1281,7 +1277,6 @@
12811277 static void sparc_lance_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
12821278 {
12831279 strlcpy(info->driver, "sunlance", sizeof(info->driver));
1284
- strlcpy(info->version, "2.02", sizeof(info->version));
12851280 }
12861281
12871282 static const struct ethtool_ops sparc_lance_ethtool_ops = {
....@@ -1304,7 +1299,6 @@
13041299 struct platform_device *lebuffer)
13051300 {
13061301 struct device_node *dp = op->dev.of_node;
1307
- static unsigned version_printed;
13081302 struct lance_private *lp;
13091303 struct net_device *dev;
13101304 int i;
....@@ -1314,9 +1308,6 @@
13141308 return -ENOMEM;
13151309
13161310 lp = netdev_priv(dev);
1317
-
1318
- if (sparc_lance_debug && version_printed++ == 0)
1319
- printk (KERN_INFO "%s", version);
13201311
13211312 spin_lock_init(&lp->lock);
13221313
....@@ -1488,9 +1479,9 @@
14881479 struct device_node *parent_dp = parent->dev.of_node;
14891480 int err;
14901481
1491
- if (!strcmp(parent_dp->name, "ledma")) {
1482
+ if (of_node_name_eq(parent_dp, "ledma")) {
14921483 err = sparc_lance_probe_one(op, parent, NULL);
1493
- } else if (!strcmp(parent_dp->name, "lebuffer")) {
1484
+ } else if (of_node_name_eq(parent_dp, "lebuffer")) {
14941485 err = sparc_lance_probe_one(op, NULL, parent);
14951486 } else
14961487 err = sparc_lance_probe_one(op, NULL, NULL);