Skip to content

Commit

Permalink
mmc: sdhci-of: fix build on non-powerpc platforms
Browse files Browse the repository at this point in the history
Explicitly include err.h, of_address.h and of_irq.h.
Make use of machine_is() conditional on PPC.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Rob Herring authored and Grant Likely committed Jan 14, 2011
1 parent 52cfd50 commit c289ef4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/mmc/host/sdhci-of-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
* your option) any later version.
*/

#include <linux/err.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/mmc/host.h>
#ifdef CONFIG_PPC
#include <asm/machdep.h>
#endif
#include "sdhci-of.h"
#include "sdhci.h"

Expand Down Expand Up @@ -112,7 +117,11 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
return true;

/* Old device trees don't have the wp-inverted property. */
#ifdef CONFIG_PPC
return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
#else
return false;
#endif
}

static int __devinit sdhci_of_probe(struct platform_device *ofdev,
Expand Down

0 comments on commit c289ef4

Please sign in to comment.