Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561111 > unrolled thread

Re: [PATCH] i2c: busses: constify dev_pm_ops structures

Started byTony Lindgren <tony@atomide.com>
First post2017-01-18 00:30 +0100
Last post2017-01-18 00:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] i2c: busses: constify dev_pm_ops structures Tony Lindgren <tony@atomide.com> - 2017-01-18 00:30 +0100

#1561111 — Re: [PATCH] i2c: busses: constify dev_pm_ops structures

FromTony Lindgren <tony@atomide.com>
Date2017-01-18 00:30 +0100
SubjectRe: [PATCH] i2c: busses: constify dev_pm_ops structures
Message-ID<t0Lmq-4UR-23@gated-at.bofh.it>
* Bhumika Goyal <bhumirks@gmail.com> [170115 02:00]:
> Declare dev_pm_ops structures as const as they are only stored in the pm
> field of a device_driver structure. This field is of type const, so
> dev_pm_ops structures having similar properties can be declared const
> too.
> 
> File size before: drivers/i2c/busses/i2c-omap.o
>    text	   data	    bss	    dec	    hex	filename
>    6814	    584	      0	   7398	   1ce6	drivers/i2c/busses/i2c-omap.o
> 
> File size after: drivers/i2c/busses/i2c-omap.o
>    text	   data	    bss	    dec	    hex	filename
>    7006	    392	      0	   7398	   1ce6	drivers/i2c/busses/i2c-omap.o
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  drivers/i2c/busses/i2c-omap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index c7da0c4..1ebb5e9 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1504,7 +1504,7 @@ static int omap_i2c_runtime_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static struct dev_pm_ops omap_i2c_pm_ops = {
> +static const struct dev_pm_ops omap_i2c_pm_ops = {
>  	SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,
>  			   omap_i2c_runtime_resume, NULL)
>  };
> -- 
> 1.9.1
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web