From: Srinivas Pandruvada Date: Mon, 4 Nov 2013 16:53:10 +0000 (-0800) Subject: PowerCap: Fix build error with option -Werror=format-security X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=08ff4cbe10da402e7c493ac72e298975f62a9e78;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Kees Cook Signed-off-by: Rafael J. Wysocki --- 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)