backlight: pwm_bl: Make of_device_ids const
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 20 Jun 2017 07:52:15 +0000 (13:22 +0530)
committerLee Jones <lee.jones@linaro.org>
Mon, 7 Aug 2017 16:04:18 +0000 (17:04 +0100)
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/pwm_bl.c

index 002f1ce..9bd1768 100644 (file)
@@ -178,7 +178,7 @@ static int pwm_backlight_parse_dt(struct device *dev,
        return 0;
 }
 
-static struct of_device_id pwm_backlight_of_match[] = {
+static const struct of_device_id pwm_backlight_of_match[] = {
        { .compatible = "pwm-backlight" },
        { }
 };