Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491224
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH RFC v2 net-next 2/8] net: qca_debug: use net_device_ops instead of direct call |
| Date | 2016-09-26 13:20 +0200 |
| Message-ID | <slC70-3b6-9@gated-at.bofh.it> (permalink) |
| References | <slBXj-37W-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
There is no need to export qcaspi_netdev_open and qcaspi_netdev_close
because they are also accessible via the net_device_ops.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/net/ethernet/qualcomm/qca_debug.c | 5 +++--
drivers/net/ethernet/qualcomm/qca_spi.h | 3 ---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c
index 8e28234..851bf07 100644
--- a/drivers/net/ethernet/qualcomm/qca_debug.c
+++ b/drivers/net/ethernet/qualcomm/qca_debug.c
@@ -273,6 +273,7 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
static int
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
{
+ const struct net_device_ops *ops = dev->netdev_ops;
struct qcaspi *qca = netdev_priv(dev);
if ((ring->rx_pending) ||
@@ -281,13 +282,13 @@ qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
return -EINVAL;
if (netif_running(dev))
- qcaspi_netdev_close(dev);
+ ops->ndo_stop(dev);
qca->txr.count = max_t(u32, ring->tx_pending, TX_RING_MIN_LEN);
qca->txr.count = min_t(u16, qca->txr.count, TX_RING_MAX_LEN);
if (netif_running(dev))
- qcaspi_netdev_open(dev);
+ ops->ndo_open(dev);
return 0;
}
diff --git a/drivers/net/ethernet/qualcomm/qca_spi.h b/drivers/net/ethernet/qualcomm/qca_spi.h
index 6e31a0e..064853d 100644
--- a/drivers/net/ethernet/qualcomm/qca_spi.h
+++ b/drivers/net/ethernet/qualcomm/qca_spi.h
@@ -108,7 +108,4 @@ struct qcaspi {
u16 burst_len;
};
-int qcaspi_netdev_open(struct net_device *dev);
-int qcaspi_netdev_close(struct net_device *dev);
-
#endif /* _QCA_SPI_H */
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC v2 net-next 0/8] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:10 +0200 [PATCH RFC v2 net-next 1/8] net: qualcomm: remove unnecessary includes Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:10 +0200 [PATCH RFC v2 net-next 6/8] net: qualcomm: prepare frame decoding for UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:10 +0200 [PATCH RFC v2 net-next 7/8] net: qualcomm: make qca_common a separate kernel module Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:10 +0200 [PATCH RFC v2 net-next 8/8] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:10 +0200 [PATCH RFC v2 net-next 3/8] net: qualcomm: move qcaspi_tx_cmd to qca_spi.c Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:10 +0200 [PATCH RFC v2 net-next 2/8] net: qca_debug: use net_device_ops instead of direct call Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:20 +0200 [PATCH RFC v2 net-next 5/8] net: qualcomm: move MTU handling to qca_common Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:20 +0200 [PATCH RFC v2 net-next 4/8] net: qualcomm: rename qca_framing.c to qca_common.c Stefan Wahren <stefan.wahren@i2se.com> - 2016-09-26 13:20 +0200
csiph-web