Commit 08ff4cbe authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Rafael J. Wysocki

PowerCap: Fix build error with option -Werror=format-security

Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&control_type->dev, name).

Changed to dev_set_name(&control_type->dev, "%s", name).
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 9e3410b7
...@@ -625,7 +625,7 @@ struct powercap_control_type *powercap_register_control_type( ...@@ -625,7 +625,7 @@ struct powercap_control_type *powercap_register_control_type(
control_type->ops = ops; control_type->ops = ops;
INIT_LIST_HEAD(&control_type->node); INIT_LIST_HEAD(&control_type->node);
control_type->dev.class = &powercap_class; control_type->dev.class = &powercap_class;
dev_set_name(&control_type->dev, name); dev_set_name(&control_type->dev, "%s", name);
result = device_register(&control_type->dev); result = device_register(&control_type->dev);
if (result) { if (result) {
if (control_type->allocated) if (control_type->allocated)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment