summaryrefslogtreecommitdiff
path: root/drivers/powercap/powercap_sys.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2013-11-04 20:53:10 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-05 05:36:57 +0400
commit08ff4cbe10da402e7c493ac72e298975f62a9e78 (patch)
tree7bd6a7992069fcaa3f6411e3a02d33d531126fc6 /drivers/powercap/powercap_sys.c
parent9e3410b764b79670a59d6c1ccdcad483b92c058c (diff)
downloadlinux-08ff4cbe10da402e7c493ac72e298975f62a9e78.tar.xz
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>
Diffstat (limited to 'drivers/powercap/powercap_sys.c')
-rw-r--r--drivers/powercap/powercap_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index 21814f90a44b..8d0fe431dbdd 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -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)