Skip to content

Commit e9a02a3

Browse files
krzkWolfram Sang
authored andcommitted
i2c: constify platform_device_id
The platform_device_id is not modified by these drivers and core uses it as const. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 096ea30 commit e9a02a3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/i2c/busses/i2c-imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static struct imx_i2c_hwdata vf610_i2c_hwdata = {
241241

242242
};
243243

244-
static struct platform_device_id imx_i2c_devtype[] = {
244+
static const struct platform_device_id imx_i2c_devtype[] = {
245245
{
246246
.name = "imx1-i2c",
247247
.driver_data = (kernel_ulong_t)&imx1_i2c_hwdata,

drivers/i2c/busses/i2c-mxs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ static int mxs_i2c_get_ofdata(struct mxs_i2c_dev *i2c)
784784
return 0;
785785
}
786786

787-
static struct platform_device_id mxs_i2c_devtype[] = {
787+
static const struct platform_device_id mxs_i2c_devtype[] = {
788788
{
789789
.name = "imx23-i2c",
790790
.driver_data = MXS_I2C_V1,

drivers/i2c/busses/i2c-rcar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ static int rcar_i2c_remove(struct platform_device *pdev)
713713
return 0;
714714
}
715715

716-
static struct platform_device_id rcar_i2c_id_table[] = {
716+
static const struct platform_device_id rcar_i2c_id_table[] = {
717717
{ "i2c-rcar", I2C_RCAR_GEN1 },
718718
{ "i2c-rcar_gen1", I2C_RCAR_GEN1 },
719719
{ "i2c-rcar_gen2", I2C_RCAR_GEN2 },

drivers/i2c/busses/i2c-s3c2410.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ struct s3c24xx_i2c {
132132
unsigned int sys_i2c_cfg;
133133
};
134134

135-
static struct platform_device_id s3c24xx_driver_ids[] = {
135+
static const struct platform_device_id s3c24xx_driver_ids[] = {
136136
{
137137
.name = "s3c2410-i2c",
138138
.driver_data = 0,

0 commit comments

Comments
 (0)