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


Groups > linux.kernel > #1715594 > unrolled thread

[PATCH 03/15] [media] i2c: make device_type const

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-19 10:30 +0200
Last post2017-08-24 18:40 +0200
Articles 2 — 2 participants

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

  [PATCH 03/15] [media] i2c: make device_type const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-19 10:30 +0200
    Re: [PATCH 03/15] [media] i2c: make device_type const Guennadi Liakhovetski <g.liakhovetski@gmx.de> - 2017-08-24 18:40 +0200

#1715594 — [PATCH 03/15] [media] i2c: make device_type const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-19 10:30 +0200
Subject[PATCH 03/15] [media] i2c: make device_type const
Message-ID<ug7iN-7kG-19@gated-at.bofh.it>
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/soc_camera/mt9t031.c b/drivers/media/i2c/soc_camera/mt9t031.c
index 714fb35..4802d30 100644
--- a/drivers/media/i2c/soc_camera/mt9t031.c
+++ b/drivers/media/i2c/soc_camera/mt9t031.c
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
 	.runtime_resume		= mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
 	.name	= "MT9T031",
 	.pm	= &mt9t031_dev_pm_ops,
 };
-- 
1.9.1

[toc] | [next] | [standalone]


#1719411

FromGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Date2017-08-24 18:40 +0200
Message-ID<ui3kK-wC-31@gated-at.bofh.it>
In reply to#1715594
On Sat, 19 Aug 2017, Bhumika Goyal wrote:

> Make this const as it is only stored in the type field of a device
> structure, which is const.
> Done using Coccinelle.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Thanks
Guennadi

> ---
>  drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/soc_camera/mt9t031.c b/drivers/media/i2c/soc_camera/mt9t031.c
> index 714fb35..4802d30 100644
> --- a/drivers/media/i2c/soc_camera/mt9t031.c
> +++ b/drivers/media/i2c/soc_camera/mt9t031.c
> @@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
>  	.runtime_resume		= mt9t031_runtime_resume,
>  };
>  
> -static struct device_type mt9t031_dev_type = {
> +static const struct device_type mt9t031_dev_type = {
>  	.name	= "MT9T031",
>  	.pm	= &mt9t031_dev_pm_ops,
>  };
> -- 
> 1.9.1
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web