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


Groups > linux.kernel > #1715729

[PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id

From Arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id
Date 2017-08-19 20:30 +0200
Message-ID <uggFs-4Ht-21@gated-at.bofh.it> (permalink)
References <uggFr-4Ht-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 86f47e1..7605661 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1754,7 +1754,7 @@ static const struct of_device_id tda998x_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, tda998x_dt_ids);
 #endif
 
-static struct i2c_device_id tda998x_ids[] = {
+static const struct i2c_device_id tda998x_ids[] = {
 	{ "tda998x", 0 },
 	{ }
 };
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] constify drm i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:30 +0200
  [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:30 +0200
  [PATCH 2/3] drm: i2c: sil164: constify i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:30 +0200
  [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:30 +0200
  Re: [PATCH 0/3] constify drm i2c_device_id Daniel Vetter <daniel@ffwll.ch> - 2017-08-22 08:40 +0200
    Re: [PATCH 0/3] constify drm i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-22 11:50 +0200

csiph-web