Commit dbf7986f authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Douglas Anderson
Browse files

drm/bridge: Constify struct i2c_device_id



'struct i2c_device_id' is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  15566	    987	     32	  16585	   40c9	drivers/gpu/drm/bridge/chipone-icn6211.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  15630	    923	     32	  16585	   40c9	drivers/gpu/drm/bridge/chipone-icn6211.o

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/bdba1f49b4b48e22628482b49ce81f8e1f0d97b1.1731445901.git.christophe.jaillet@wanadoo.fr
parent ea8f9de8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -785,7 +785,7 @@ static struct mipi_dsi_driver chipone_dsi_driver = {
	},
};

static struct i2c_device_id chipone_i2c_id[] = {
static const struct i2c_device_id chipone_i2c_id[] = {
	{ "chipone,icn6211" },
	{},
};
+1 −1
Original line number Diff line number Diff line
@@ -773,7 +773,7 @@ static void lt9211_remove(struct i2c_client *client)
	drm_bridge_remove(&ctx->bridge);
}

static struct i2c_device_id lt9211_id[] = {
static const struct i2c_device_id lt9211_id[] = {
	{ "lontium,lt9211" },
	{},
};
+1 −1
Original line number Diff line number Diff line
@@ -1235,7 +1235,7 @@ static void lt9611_remove(struct i2c_client *client)
	of_node_put(lt9611->dsi0_node);
}

static struct i2c_device_id lt9611_id[] = {
static const struct i2c_device_id lt9611_id[] = {
	{ "lontium,lt9611", 0 },
	{}
};
+1 −1
Original line number Diff line number Diff line
@@ -913,7 +913,7 @@ static void lt9611uxc_remove(struct i2c_client *client)
	of_node_put(lt9611uxc->dsi0_node);
}

static struct i2c_device_id lt9611uxc_id[] = {
static const struct i2c_device_id lt9611uxc_id[] = {
	{ "lontium,lt9611uxc", 0 },
	{ /* sentinel */ }
};
+1 −1
Original line number Diff line number Diff line
@@ -732,7 +732,7 @@ static void sn65dsi83_remove(struct i2c_client *client)
	drm_bridge_remove(&ctx->bridge);
}

static struct i2c_device_id sn65dsi83_id[] = {
static const struct i2c_device_id sn65dsi83_id[] = {
	{ "ti,sn65dsi83", MODEL_SN65DSI83 },
	{ "ti,sn65dsi84", MODEL_SN65DSI84 },
	{},
Loading