Skip to content

Commit

Permalink
mmc: mmci: Fix compiler error when CONFIG_OF is not set
Browse files Browse the repository at this point in the history
error: implicit declaration of function 'mmci_dt_populate_generic_pdata'

This is due to the '#if CONFIG_OF' guards placed around
mmci_dt_populate_generic_pdata(), but not around the call to it. We
repair this by inserting a stub which elegantly returns when CONFIG_OF
is not set.

Reported-by: Paul Gortmaker <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
Lee Jones authored and cjb committed May 8, 2012
1 parent 9a59701 commit c0a120a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,12 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np,
pr_warn("%s: Unsupported bus width\n", np->full_name);
}
}
#else
static void mmci_dt_populate_generic_pdata(struct device_node *np,
struct mmci_platform_data *pdata)
{
return;
}
#endif

static int __devinit mmci_probe(struct amba_device *dev,
Expand Down

0 comments on commit c0a120a

Please sign in to comment.