[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1386243458-32576-1-git-send-email-wangyijing@huawei.com>
Date: Thu, 5 Dec 2013 19:37:38 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: Steffen Klassert <klassert@...hematik.tu-chemnitz.de>,
"David S. Miller" <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Yijing Wang <wangyijing@...wei.com>,
Hanjun Guo <guohanjun@...wei.com>
Subject: [PATCH 1/2] 3c59x/net: Use dev_is_pci() to simplify code
Use standard PCI macro dev_is_pci() to simplify code.
Signed-off-by: Yijing Wang <wangyijing@...wei.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists