From: Mark Einon <mark.einon@gmail.com>
To: gregkh@suse.de
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
o.hartmann@telovital.com, alan@lxorguk.ukuu.org.uk,
Mark Einon <mark.einon@gmail.com>
Subject: [PATCH v2 5/7] staging: et131x: et131x_netdev.c checkpatch fixes
Date: Mon, 6 Jun 2011 19:07:02 +0100 [thread overview]
Message-ID: <1307383624-8740-6-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1307383624-8740-1-git-send-email-mark.einon@gmail.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
drivers/staging/et131x/et131x_netdev.c | 112 ++++++++++++++-----------------
1 files changed, 51 insertions(+), 61 deletions(-)
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c
index 5f6522c..7cc4b48 100644
--- a/drivers/staging/et131x/et131x_netdev.c
+++ b/drivers/staging/et131x/et131x_netdev.c
@@ -89,67 +89,6 @@
#include "et131x.h"
struct net_device_stats *et131x_stats(struct net_device *netdev);
-int et131x_open(struct net_device *netdev);
-int et131x_close(struct net_device *netdev);
-int et131x_ioctl(struct net_device *netdev, struct ifreq *reqbuf, int cmd);
-void et131x_multicast(struct net_device *netdev);
-int et131x_tx(struct sk_buff *skb, struct net_device *netdev);
-void et131x_tx_timeout(struct net_device *netdev);
-int et131x_change_mtu(struct net_device *netdev, int new_mtu);
-int et131x_set_mac_addr(struct net_device *netdev, void *new_mac);
-void et131x_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp);
-void et131x_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
-void et131x_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
-
-static const struct net_device_ops et131x_netdev_ops = {
- .ndo_open = et131x_open,
- .ndo_stop = et131x_close,
- .ndo_start_xmit = et131x_tx,
- .ndo_set_multicast_list = et131x_multicast,
- .ndo_tx_timeout = et131x_tx_timeout,
- .ndo_change_mtu = et131x_change_mtu,
- .ndo_set_mac_address = et131x_set_mac_addr,
- .ndo_validate_addr = eth_validate_addr,
- .ndo_get_stats = et131x_stats,
- .ndo_do_ioctl = et131x_ioctl,
-};
-
-/**
- * et131x_device_alloc
- *
- * Returns pointer to the allocated and initialized net_device struct for
- * this device.
- *
- * Create instances of net_device and wl_private for the new adapter and
- * register the device's entry points in the net_device structure.
- */
-struct net_device *et131x_device_alloc(void)
-{
- struct net_device *netdev;
-
- /* Alloc net_device and adapter structs */
- netdev = alloc_etherdev(sizeof(struct et131x_adapter));
-
- if (netdev == NULL) {
- printk(KERN_ERR "et131x: Alloc of net_device struct failed\n");
- return NULL;
- }
-
- /* Setup the function registration table (and other data) for a
- * net_device
- */
- /* netdev->init = &et131x_init; */
- /* netdev->set_config = &et131x_config; */
- netdev->watchdog_timeo = ET131X_TX_TIMEOUT;
- netdev->netdev_ops = &et131x_netdev_ops;
-
- /* netdev->ethtool_ops = &et131x_ethtool_ops; */
-
- /* Poll? */
- /* netdev->poll = &et131x_poll; */
- /* netdev->poll_controller = &et131x_poll_controller; */
- return netdev;
-}
/**
* et131x_stats - Return the current device statistics.
@@ -702,3 +641,54 @@ int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)
netif_wake_queue(netdev);
return result;
}
+
+static const struct net_device_ops et131x_netdev_ops = {
+ .ndo_open = et131x_open,
+ .ndo_stop = et131x_close,
+ .ndo_start_xmit = et131x_tx,
+ .ndo_set_multicast_list = et131x_multicast,
+ .ndo_tx_timeout = et131x_tx_timeout,
+ .ndo_change_mtu = et131x_change_mtu,
+ .ndo_set_mac_address = et131x_set_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_get_stats = et131x_stats,
+ .ndo_do_ioctl = et131x_ioctl,
+};
+
+/**
+ * et131x_device_alloc
+ *
+ * Returns pointer to the allocated and initialized net_device struct for
+ * this device.
+ *
+ * Create instances of net_device and wl_private for the new adapter and
+ * register the device's entry points in the net_device structure.
+ */
+struct net_device *et131x_device_alloc(void)
+{
+ struct net_device *netdev;
+
+ /* Alloc net_device and adapter structs */
+ netdev = alloc_etherdev(sizeof(struct et131x_adapter));
+
+ if (netdev == NULL) {
+ printk(KERN_ERR "et131x: Alloc of net_device struct failed\n");
+ return NULL;
+ }
+
+ /* Setup the function registration table (and other data) for a
+ * net_device
+ */
+ /* netdev->init = &et131x_init; */
+ /* netdev->set_config = &et131x_config; */
+ netdev->watchdog_timeo = ET131X_TX_TIMEOUT;
+ netdev->netdev_ops = &et131x_netdev_ops;
+
+ /* netdev->ethtool_ops = &et131x_ethtool_ops; */
+
+ /* Poll? */
+ /* netdev->poll = &et131x_poll; */
+ /* netdev->poll_controller = &et131x_poll_controller; */
+ return netdev;
+}
+
--
1.7.4.4
next prev parent reply other threads:[~2011-06-06 18:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-05 17:35 [PATCH 0/5] staging: et131x: checkpatch fixes Mark Einon
2011-06-05 17:35 ` [PATCH 1/5] staging: et131x: et1310_address_map.h " Mark Einon
2011-06-05 19:14 ` Alan Cox
2011-06-05 17:35 ` [PATCH 2/5] staging: et131x: et1310_rx.c " Mark Einon
2011-06-05 19:08 ` Alan Cox
2011-06-05 17:35 ` [PATCH 3/5] staging: et131x: et131x_adapter.h " Mark Einon
2011-06-05 19:11 ` Alan Cox
2011-06-05 17:35 ` [PATCH 4/5] staging: et131x: et131x_initpci.c " Mark Einon
2011-06-05 19:09 ` Alan Cox
2011-06-06 6:00 ` Dan Carpenter
2011-06-05 17:35 ` [PATCH 5/5] staging: et131x: et131x_netdev.c " Mark Einon
2011-06-05 19:10 ` Alan Cox
2011-06-05 19:11 ` [PATCH 0/5] staging: et131x: " Alan Cox
2011-06-06 18:06 ` [PATCH v2 0/7] " Mark Einon
2011-06-06 18:06 ` [PATCH v2 1/7] staging: et131x: checkpatch fixes for et1310_address_map.h (All 'do not add new typedefs') Mark Einon
2011-06-06 18:06 ` [PATCH v2 2/7] staging: et131x: et1310_rx.c checkpatch fixes Mark Einon
2011-06-06 18:07 ` [PATCH v2 3/7] staging: et131x: et131x_adapter.h " Mark Einon
2011-06-06 18:07 ` [PATCH v2 4/7] staging: et131x: et131x_initpci.c " Mark Einon
2011-06-06 18:07 ` Mark Einon [this message]
2011-06-06 18:07 ` [PATCH v2 6/7] staging: et131x: Fixes multiple 'WARNING: do not add new typedefs' Mark Einon
2011-06-06 18:07 ` [PATCH v2 7/7] staging: et131x: Removing '_t' from ce_stats_t struct Mark Einon
2011-06-06 18:31 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307383624-8740-6-git-send-email-mark.einon@gmail.com \
--to=mark.einon@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=o.hartmann@telovital.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox