]> git.baikalelectronics.ru Git - kernel.git/commitdiff
3c59x/net: Use dev_is_pci() instead of hardcoding
authorYijing Wang <wangyijing@huawei.com>
Fri, 6 Dec 2013 06:34:55 +0000 (14:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Dec 2013 17:51:40 +0000 (12:51 -0500)
Use PCI standard macro dev_is_pci() instead of hardcoding.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/3com/3c59x.c

index ad5272b348f07debb61c540a909da8fa0e1593f1..af24c3cf821582c56cefab0b592a3e5d3392f9bd 100644 (file)
@@ -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