From: Yijing Wang <wangyijing@huawei.com>
To: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>,
"David S. Miller" <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Yijing Wang <wangyijing@huawei.com>,
Hanjun Guo <guohanjun@huawei.com>
Subject: [PATCH 1/2] 3c59x/net: Use dev_is_pci() to simplify code
Date: Thu, 5 Dec 2013 19:37:38 +0800 [thread overview]
Message-ID: <1386243458-32576-1-git-send-email-wangyijing@huawei.com> (raw)
Use standard PCI macro dev_is_pci() to simplify code.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
drivers/net/ethernet/3com/3c59x.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index ad5272b..af24c3c 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -693,7 +693,7 @@ DEFINE_WINDOW_IO(16)
DEFINE_WINDOW_IO(32)
#ifdef CONFIG_PCI
-#define DEVICE_PCI(dev) (((dev)->bus == &pci_bus_type) ? to_pci_dev((dev)) : NULL)
+#define DEVICE_PCI(dev) ((dev_is_pci(dev)) ? to_pci_dev((dev)) : NULL)
#else
#define DEVICE_PCI(dev) NULL
#endif
--
1.7.1
reply other threads:[~2013-12-05 11:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1386243458-32576-1-git-send-email-wangyijing@huawei.com \
--to=wangyijing@huawei.com \
--cc=davem@davemloft.net \
--cc=guohanjun@huawei.com \
--cc=klassert@mathematik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--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).