* [PATCH 1/2] 3c59x/net: Use dev_is_pci() to simplify code
@ 2013-12-05 11:37 Yijing Wang
0 siblings, 0 replies; only message in thread
From: Yijing Wang @ 2013-12-05 11:37 UTC (permalink / raw)
To: Steffen Klassert, David S. Miller
Cc: netdev, linux-kernel, Yijing Wang, Hanjun Guo
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-05 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 11:37 [PATCH 1/2] 3c59x/net: Use dev_is_pci() to simplify code Yijing Wang
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).