backlight: ipaq_micro: Make structure micro_bl_props constant
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Tue, 13 Aug 2019 08:58:55 +0000 (14:28 +0530)
committerLee Jones <lee.jones@linaro.org>
Wed, 2 Oct 2019 13:19:00 +0000 (14:19 +0100)
Static structure micro_bl_props, having type backlight_properties, is
used only once, when it is passed as the last argument to function
devm_backlight_device_register(). devm_backlight_device_register() is
defined with its last parameter being declared constant. Hence make
micro_bl_props itself constant as well.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/ipaq_micro_bl.c

index 1123f67..85b16cc 100644 (file)
@@ -44,7 +44,7 @@ static const struct backlight_ops micro_bl_ops = {
        .update_status  = micro_bl_update_status,
 };
 
-static struct backlight_properties micro_bl_props = {
+static const struct backlight_properties micro_bl_props = {
        .type = BACKLIGHT_RAW,
        .max_brightness = 255,
        .power = FB_BLANK_UNBLANK,