diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-08-17 05:31:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-17 05:31:15 -0400 |
commit | 01414802054c382072b6cb9a1bdc6e243c74b2d5 (patch) | |
tree | f09b05eb9fff16a69d83ec28653992d1bae8d74c /drivers/net/pcmcia/pcnet_cs.c | |
parent | bb8a10bbd10a45db0eb45bac520489bdbc0917ef (diff) |
ethtool: Provide a default implementation of ethtool_ops::get_drvinfo
The driver name and bus address for a net_device can normally be found
through the driver model now. Instead of requiring drivers to provide
this information redundantly through the ethtool_ops::get_drvinfo
operation, use the driver model to do so if the driver does not define
the operation. Since ETHTOOL_GDRVINFO no longer requires the driver
to implement any operations, do not require net_device::ethtool_ops to
be set either.
Remove implementations of get_drvinfo and ethtool_ops that provide
only this information.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pcmcia/pcnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index c3edfe4c2651..2e1348c0033e 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/timer.h> | 36 | #include <linux/timer.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/ethtool.h> | ||
39 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
40 | #include <linux/log2.h> | 39 | #include <linux/log2.h> |
41 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
@@ -100,7 +99,6 @@ static void pcnet_release(struct pcmcia_device *link); | |||
100 | static int pcnet_open(struct net_device *dev); | 99 | static int pcnet_open(struct net_device *dev); |
101 | static int pcnet_close(struct net_device *dev); | 100 | static int pcnet_close(struct net_device *dev); |
102 | static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 101 | static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
103 | static const struct ethtool_ops netdev_ethtool_ops; | ||
104 | static irqreturn_t ei_irq_wrapper(int irq, void *dev_id); | 102 | static irqreturn_t ei_irq_wrapper(int irq, void *dev_id); |
105 | static void ei_watchdog(u_long arg); | 103 | static void ei_watchdog(u_long arg); |
106 | static void pcnet_reset_8390(struct net_device *dev); | 104 | static void pcnet_reset_8390(struct net_device *dev); |
@@ -628,8 +626,6 @@ static int pcnet_config(struct pcmcia_device *link) | |||
628 | ei_status.word16 = 1; | 626 | ei_status.word16 = 1; |
629 | ei_status.reset_8390 = &pcnet_reset_8390; | 627 | ei_status.reset_8390 = &pcnet_reset_8390; |
630 | 628 | ||
631 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | ||
632 | |||
633 | if (info->flags & (IS_DL10019|IS_DL10022)) | 629 | if (info->flags & (IS_DL10019|IS_DL10022)) |
634 | mii_phy_probe(dev); | 630 | mii_phy_probe(dev); |
635 | 631 | ||
@@ -1143,18 +1139,6 @@ reschedule: | |||
1143 | 1139 | ||
1144 | /*====================================================================*/ | 1140 | /*====================================================================*/ |
1145 | 1141 | ||
1146 | static void netdev_get_drvinfo(struct net_device *dev, | ||
1147 | struct ethtool_drvinfo *info) | ||
1148 | { | ||
1149 | strcpy(info->driver, "pcnet_cs"); | ||
1150 | } | ||
1151 | |||
1152 | static const struct ethtool_ops netdev_ethtool_ops = { | ||
1153 | .get_drvinfo = netdev_get_drvinfo, | ||
1154 | }; | ||
1155 | |||
1156 | /*====================================================================*/ | ||
1157 | |||
1158 | 1142 | ||
1159 | static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 1143 | static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
1160 | { | 1144 | { |