Skip to contentSkip to conversation

gpio: mxc: Constify platform_device_id

PATCH In review Krzysztof Kozlowski 2 participants 6 messages May 1, 2015 – May 12, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 gpio: mxc: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as const.

---
 drivers/gpio/gpio-mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-mxc.c +1 -1
index 9f7446a7ac64..e2d3eda1fe87 100644
@@ -131,7 +131,7 @@ static struct mxc_gpio_hwdata *mxc_gpio_hwdata;
 #define GPIO_INT_FALL_EDGE	(mxc_gpio_hwdata->fall_edge)
 #define GPIO_INT_BOTH_EDGES	0x4
 
-static struct platform_device_id mxc_gpio_devtype[] = {
+static const struct platform_device_id mxc_gpio_devtype[] = {
 	{
 		.name = "imx1-gpio",
 		.driver_data = IMX1_GPIO,
Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/3 gpio: mxs: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as const.

---
 drivers/gpio/gpio-mxs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-mxs.c +1 -1
index 84cbda6acdda..150a3225aa41 100644
@@ -239,7 +239,7 @@ static int mxs_gpio_get_direction(struct gpio_chip *gc, unsigned offset)
 	return !(dir & mask);
 }
 
-static struct platform_device_id mxs_gpio_ids[] = {
+static const struct platform_device_id mxs_gpio_ids[] = {
 	{
 		.name = "imx23-gpio",
 		.driver_data = IMX23_GPIO,
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/3 gpio: ts5500: Constify platform_device_id

In reply to Krzysztof Kozlowski

The platform_device_id is not modified by the driver and core uses it as const.

---
 drivers/gpio/gpio-ts5500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-ts5500.c +1 -1
index 92fbabd82879..b29a102d136b 100644
@@ -440,7 +440,7 @@ static int ts5500_dio_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct platform_device_id ts5500_dio_ids[] = {
+static const struct platform_device_id ts5500_dio_ids[] = {
 	{ "ts5500-dio1", TS5500_DIO1 },
 	{ "ts5500-dio2", TS5500_DIO2 },
 	{ "ts5500-dio-lcd", TS5500_LCD },
Signature · 1 line
2.1.4