Skip to content

Commit

Permalink
mmc: constify mmc_host_ops vectors
Browse files Browse the repository at this point in the history
Now that mmc_host_ops can be constified, update the various drivers
to constify those method tables and shrink the writable data segment.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
  • Loading branch information
David Brownell authored and Pierre Ossman committed Dec 1, 2006
1 parent 87598a2 commit ab7aefd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/mmc/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ int at91_mci_get_ro(struct mmc_host *mmc)
return read_only;
}

static struct mmc_host_ops at91_mci_ops = {
static const struct mmc_host_ops at91_mci_ops = {
.request = at91_mci_request,
.set_ios = at91_mci_set_ios,
.get_ro = at91_mci_get_ro,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/au1xmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ static void au1xmmc_init_dma(struct au1xmmc_host *host)
host->rx_chan = rxchan;
}

struct mmc_host_ops au1xmmc_ops = {
struct const mmc_host_ops au1xmmc_ops = {
.request = au1xmmc_request,
.set_ios = au1xmmc_set_ios,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/imxmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
}
}

static struct mmc_host_ops imxmci_ops = {
static const struct mmc_host_ops imxmci_ops = {
.request = imxmci_request,
.set_ios = imxmci_set_ios,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
}
}

static struct mmc_host_ops mmci_ops = {
static const struct mmc_host_ops mmci_ops = {
.request = mmci_request,
.set_ios = mmci_set_ios,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static int mmc_omap_get_ro(struct mmc_host *mmc)
return host->wp_pin && omap_get_gpio_datain(host->wp_pin);
}

static struct mmc_host_ops mmc_omap_ops = {
static const struct mmc_host_ops mmc_omap_ops = {
.request = mmc_omap_request,
.set_ios = mmc_omap_set_ios,
.get_ro = mmc_omap_get_ro,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
host->clkrt, host->cmdat);
}

static struct mmc_host_ops pxamci_ops = {
static const struct mmc_host_ops pxamci_ops = {
.request = pxamci_request,
.get_ro = pxamci_get_ro,
.set_ios = pxamci_set_ios,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ static int sdhci_get_ro(struct mmc_host *mmc)
return !(present & SDHCI_WRITE_PROTECT);
}

static struct mmc_host_ops sdhci_ops = {
static const struct mmc_host_ops sdhci_ops = {
.request = sdhci_request,
.set_ios = sdhci_set_ios,
.get_ro = sdhci_get_ro,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/wbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ static int wbsd_get_ro(struct mmc_host *mmc)
return csr & WBSD_WRPT;
}

static struct mmc_host_ops wbsd_ops = {
static const struct mmc_host_ops wbsd_ops = {
.request = wbsd_request,
.set_ios = wbsd_set_ios,
.get_ro = wbsd_get_ro,
Expand Down

0 comments on commit ab7aefd

Please sign in to comment.