* [PATCH] mmc: host: omap_hsmmc: constify dev_pm_ops structures.
@ 2017-06-29 8:09 Arvind Yadav
2017-07-11 14:42 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-29 8:09 UTC (permalink / raw)
To: ulf.hansson, dan.carpenter, linus.walleij, hkallweit1
Cc: linux-mmc, linux-omap, linux-kernel
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>
---
drivers/mmc/host/omap_hsmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 8c39dcc..5b391dc 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2342,7 +2342,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
return 0;
}
-static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
+static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume)
.runtime_suspend = omap_hsmmc_runtime_suspend,
.runtime_resume = omap_hsmmc_runtime_resume,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: host: omap_hsmmc: constify dev_pm_ops structures.
2017-06-29 8:09 [PATCH] mmc: host: omap_hsmmc: constify dev_pm_ops structures Arvind Yadav
@ 2017-07-11 14:42 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2017-07-11 14:42 UTC (permalink / raw)
To: Arvind Yadav
Cc: Dan Carpenter, Linus Walleij, Heiner Kallweit, linux-mmc,
linux-omap, linux-kernel
On 29 June 2017 at 10:09, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
> 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>
Thanks, applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/omap_hsmmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 8c39dcc..5b391dc 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2342,7 +2342,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
> return 0;
> }
>
> -static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
> +static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume)
> .runtime_suspend = omap_hsmmc_runtime_suspend,
> .runtime_resume = omap_hsmmc_runtime_resume,
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-11 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 8:09 [PATCH] mmc: host: omap_hsmmc: constify dev_pm_ops structures Arvind Yadav
2017-07-11 14:42 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.