Skip to content

Commit

Permalink
backlight: ipaq_micro: Make structure micro_bl_props constant
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nishka Dasgupta authored and Lee Jones committed Oct 2, 2019
1 parent 8ad003e commit 7050a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/backlight/ipaq_micro_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7050a7c

Please sign in to comment.