Skip to content

Commit

Permalink
mmc: Fix omap compile by replacing dev_name with dma_dev_name
Browse files Browse the repository at this point in the history
This patch fixes error:

drivers/mmc/host/omap.c: In function 'mmc_omap_get_dma_channel':
drivers/mmc/host/omap.c:1038: error: called object 'dev_name' is not a function

Commit 0691663 adds a function
called dev_name. This will cause a name conflict as dev_dbg calls
dev_name(((host->mmc)->parent)).

This same issue should not affect other drivers as they don't seem
to use dev_name with dev_dbg.

Thanks to Paul Walmsley <paul@pwsan.com> for figuring this one out.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
  • Loading branch information
Tony Lindgren authored and Pierre Ossman committed May 14, 2008
1 parent 28a4acb commit df48dd0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/mmc/host/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ static void mmc_omap_dma_cb(int lch, u16 ch_status, void *data)

static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data *data)
{
const char *dev_name;
const char *dma_dev_name;
int sync_dev, dma_ch, is_read, r;

is_read = !(data->flags & MMC_DATA_WRITE);
Expand All @@ -1018,21 +1018,21 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data
if (is_read) {
if (host->id == 1) {
sync_dev = OMAP_DMA_MMC_RX;
dev_name = "MMC1 read";
dma_dev_name = "MMC1 read";
} else {
sync_dev = OMAP_DMA_MMC2_RX;
dev_name = "MMC2 read";
dma_dev_name = "MMC2 read";
}
} else {
if (host->id == 1) {
sync_dev = OMAP_DMA_MMC_TX;
dev_name = "MMC1 write";
dma_dev_name = "MMC1 write";
} else {
sync_dev = OMAP_DMA_MMC2_TX;
dev_name = "MMC2 write";
dma_dev_name = "MMC2 write";
}
}
r = omap_request_dma(sync_dev, dev_name, mmc_omap_dma_cb,
r = omap_request_dma(sync_dev, dma_dev_name, mmc_omap_dma_cb,
host, &dma_ch);
if (r != 0) {
dev_dbg(mmc_dev(host->mmc), "omap_request_dma() failed with %d\n", r);
Expand Down

0 comments on commit df48dd0

Please sign in to comment.