Skip to content

Commit f1a8870

Browse files
author
Thierry Reding
committed
pwm: Constify OF match tables
A few drivers already annotate this properly. Make the same change for all other OF supporting drivers. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent bdd7cf9 commit f1a8870

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

drivers/pwm/pwm-lpc32xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int lpc32xx_pwm_remove(struct platform_device *pdev)
145145
return pwmchip_remove(&lpc32xx->chip);
146146
}
147147

148-
static struct of_device_id lpc32xx_pwm_dt_ids[] = {
148+
static const struct of_device_id lpc32xx_pwm_dt_ids[] = {
149149
{ .compatible = "nxp,lpc3220-pwm", },
150150
{ /* sentinel */ }
151151
};

drivers/pwm/pwm-mxs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static int mxs_pwm_remove(struct platform_device *pdev)
179179
return pwmchip_remove(&mxs->chip);
180180
}
181181

182-
static struct of_device_id mxs_pwm_dt_ids[] = {
182+
static const struct of_device_id mxs_pwm_dt_ids[] = {
183183
{ .compatible = "fsl,imx23-pwm", },
184184
{ /* sentinel */ }
185185
};

drivers/pwm/pwm-spear.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static int spear_pwm_remove(struct platform_device *pdev)
248248
return pwmchip_remove(&pc->chip);
249249
}
250250

251-
static struct of_device_id spear_pwm_of_match[] = {
251+
static const struct of_device_id spear_pwm_of_match[] = {
252252
{ .compatible = "st,spear320-pwm" },
253253
{ .compatible = "st,spear1340-pwm" },
254254
{ }

drivers/pwm/pwm-tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static int tegra_pwm_remove(struct platform_device *pdev)
233233
return pwmchip_remove(&pc->chip);
234234
}
235235

236-
static struct of_device_id tegra_pwm_of_match[] = {
236+
static const struct of_device_id tegra_pwm_of_match[] = {
237237
{ .compatible = "nvidia,tegra20-pwm" },
238238
{ .compatible = "nvidia,tegra30-pwm" },
239239
{ }

drivers/pwm/pwm-twl-led.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static int twl_pwmled_remove(struct platform_device *pdev)
323323
}
324324

325325
#ifdef CONFIG_OF
326-
static struct of_device_id twl_pwmled_of_match[] = {
326+
static const struct of_device_id twl_pwmled_of_match[] = {
327327
{ .compatible = "ti,twl4030-pwmled" },
328328
{ .compatible = "ti,twl6030-pwmled" },
329329
{ },

drivers/pwm/pwm-twl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static int twl_pwm_remove(struct platform_device *pdev)
335335
}
336336

337337
#ifdef CONFIG_OF
338-
static struct of_device_id twl_pwm_of_match[] = {
338+
static const struct of_device_id twl_pwm_of_match[] = {
339339
{ .compatible = "ti,twl4030-pwm" },
340340
{ .compatible = "ti,twl6030-pwm" },
341341
{ },

0 commit comments

Comments
 (0)