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: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Srinivas Pandruvada 2013-11-04 08:53:10 -08:00 committed by Rafael J. Wysocki
parent 9e3410b764
commit 08ff4cbe10
1 changed files with 1 additions and 1 deletions

View File

@ -625,7 +625,7 @@ struct powercap_control_type *powercap_register_control_type(
control_type->ops = ops;
INIT_LIST_HEAD(&control_type->node);
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);
if (result) {
if (control_type->allocated)