diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-11-16 00:27:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-18 13:47:42 -0500 |
commit | d530db0db90378b5674cb78d9c0cfcc83f851a5e (patch) | |
tree | 094638394270074f85e6aa6e2a89e00f0e92cb86 /drivers | |
parent | 1aa46ec91cfd3cc4ab19780f664a3d089bb67173 (diff) |
3c59x: fix build failure on !CONFIG_PCI
VORTEX_PCI() could return NULL so it needs to be casted before
accessing any member of struct pci_dev. This fixes following
build failure. Likewise VORTEX_EISA() was changed also.
CC [M] drivers/net/3c59x.o
drivers/net/3c59x.c: In function 'acpi_set_WOL':
drivers/net/3c59x.c:3211:39: warning: dereferencing 'void *' pointer
drivers/net/3c59x.c:3211:39: error: request for member 'current_state' in something not a structure or union
make[3]: *** [drivers/net/3c59x.o] Error 1
make[2]: *** [drivers/net/3c59x.o] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/3c59x.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index e1da258bbfb7..0a92436f0538 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -699,7 +699,8 @@ DEFINE_WINDOW_IO(32) | |||
699 | #define DEVICE_PCI(dev) NULL | 699 | #define DEVICE_PCI(dev) NULL |
700 | #endif | 700 | #endif |
701 | 701 | ||
702 | #define VORTEX_PCI(vp) (((vp)->gendev) ? DEVICE_PCI((vp)->gendev) : NULL) | 702 | #define VORTEX_PCI(vp) \ |
703 | ((struct pci_dev *) (((vp)->gendev) ? DEVICE_PCI((vp)->gendev) : NULL)) | ||
703 | 704 | ||
704 | #ifdef CONFIG_EISA | 705 | #ifdef CONFIG_EISA |
705 | #define DEVICE_EISA(dev) (((dev)->bus == &eisa_bus_type) ? to_eisa_device((dev)) : NULL) | 706 | #define DEVICE_EISA(dev) (((dev)->bus == &eisa_bus_type) ? to_eisa_device((dev)) : NULL) |
@@ -707,7 +708,8 @@ DEFINE_WINDOW_IO(32) | |||
707 | #define DEVICE_EISA(dev) NULL | 708 | #define DEVICE_EISA(dev) NULL |
708 | #endif | 709 | #endif |
709 | 710 | ||
710 | #define VORTEX_EISA(vp) (((vp)->gendev) ? DEVICE_EISA((vp)->gendev) : NULL) | 711 | #define VORTEX_EISA(vp) \ |
712 | ((struct eisa_device *) (((vp)->gendev) ? DEVICE_EISA((vp)->gendev) : NULL)) | ||
711 | 713 | ||
712 | /* The action to take with a media selection timer tick. | 714 | /* The action to take with a media selection timer tick. |
713 | Note that we deviate from the 3Com order by checking 10base2 before AUI. | 715 | Note that we deviate from the 3Com order by checking 10base2 before AUI. |