Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: ipaq_micro: Make structure micro_bl_props constant

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>

authored by

Nishka Dasgupta and committed by
Lee Jones
7050a7c3 8ad003e7

+1 -1
+1 -1
drivers/video/backlight/ipaq_micro_bl.c
··· 44 44 .update_status = micro_bl_update_status, 45 45 }; 46 46 47 - static struct backlight_properties micro_bl_props = { 47 + static const struct backlight_properties micro_bl_props = { 48 48 .type = BACKLIGHT_RAW, 49 49 .max_brightness = 255, 50 50 .power = FB_BLANK_UNBLANK,