Skip to content

Commit

Permalink
cassini: Fix build bustage on x86.
Browse files Browse the repository at this point in the history
Unfortunately, not all CONFIG_OF platforms provide
pci_device_to_OF_node().

Change the test to CONFIG_SPARC for now to deal with
the build regressions.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 14, 2011
1 parent f1e02ed commit 92d76e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -3203,7 +3203,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr,
int phy_type = CAS_PHY_MII_MDIO0; /* default phy type */
int mac_off = 0;

#if defined(CONFIG_OF)
#if defined(CONFIG_SPARC)
const unsigned char *addr;
#endif

Expand Down Expand Up @@ -3354,7 +3354,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr,
if (found & VPD_FOUND_MAC)
goto done;

#if defined(CONFIG_OF)
#if defined(CONFIG_SPARC)
addr = of_get_property(cp->of_node, "local-mac-address", NULL);
if (addr != NULL) {
memcpy(dev_addr, addr, 6);
Expand Down Expand Up @@ -5031,7 +5031,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
cp->msg_enable = (cassini_debug < 0) ? CAS_DEF_MSG_ENABLE :
cassini_debug;

#if defined(CONFIG_OF)
#if defined(CONFIG_SPARC)
cp->of_node = pci_device_to_OF_node(pdev);
#endif

Expand Down

0 comments on commit 92d76e8

Please sign in to comment.