Skip to content

Commit 6bba406

Browse files
ArvindYadavCsstorulf
authored andcommitted
mmc: omap_hsmmc: constify dev_pm_ops structures
dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by <linux/device.h> work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 11586 624 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o File size After adding 'const': text data bss dec hex filename 11778 432 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 7f55eb1 commit 6bba406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/omap_hsmmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2322,7 +2322,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
23222322
return 0;
23232323
}
23242324

2325-
static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
2325+
static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
23262326
SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume)
23272327
.runtime_suspend = omap_hsmmc_runtime_suspend,
23282328
.runtime_resume = omap_hsmmc_runtime_resume,

0 commit comments

Comments
 (0)