From: Wang Chen <wangchen@cn.fujitsu.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: gregkh@suse.de, NETDEV <netdev@vger.kernel.org>
Subject: [PATCH next] staging-winbond: Kill directly reference of netdev->priv
Date: Mon, 08 Dec 2008 13:33:22 +0800 [thread overview]
Message-ID: <493CB1A2.7080005@cn.fujitsu.com> (raw)
This driver is not yet finished.
At this time, we don't know how netdev be created and how
private data be allocated.
So, simply use netdev_priv() now and leave some temp comment.
Compile test only.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
drivers/staging/winbond/linux/wbusb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index f4a7875..39ca9b9 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -336,7 +336,11 @@ WbUsb_destroy(phw_data_t pHwData)
int wb35_open(struct net_device *netdev)
{
- PADAPTER Adapter = (PADAPTER)netdev->priv;
+ /* netdev_priv() or netdev->ml_priv should reference to the address of
+ * private data(PADAPTER). It depends on whether private data memory is
+ * allocated when alloc_netdev().
+ */
+ PADAPTER Adapter = (PADAPTER)netdev_priv(netdev);
phw_data_t pHwData = &Adapter->sHwData;
netif_start_queue(netdev);
--
1.5.3.4
next reply other threads:[~2008-12-08 5:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 5:33 Wang Chen [this message]
2008-12-08 9:13 ` [PATCH next] staging-winbond: Kill directly reference of netdev->priv David Miller
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=493CB1A2.7080005@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=gregkh@suse.de \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).