Skip to contentSkip to conversation

input: cros_ec_keyb: remove extraneous 'const'

PATCH Applied Arnd Bergmann 2 participants 2 messages May 11, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: cros_ec_keyb: remove extraneous 'const'

gcc-7 warns about 'const SIMPLE_DEV_PM_OPS', as that macro already constains a 'const' keyword:

drivers/input/keyboard/cros_ec_keyb.c:663:14: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
static const SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);

This removes the extra one.

Fixes 6af6dc2d2aa6 ("input: Add ChromeOS EC keyboard driver")
---
 drivers/input/keyboard/cros_ec_keyb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/cros_ec_keyb.c +1 -1
index c7a8120b13c0..79eb29550c34 100644
@@ -660,7 +660,7 @@ static const struct of_device_id cros_ec_keyb_of_match[] = {
 MODULE_DEVICE_TABLE(of, cros_ec_keyb_of_match);
 #endif
 
-static const SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);
+static SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);
 
 static struct platform_driver cros_ec_keyb_driver = {
 	.probe = cros_ec_keyb_probe,
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw
Quoted 10 lines · Arnd Bergmann

gcc-7 warns about 'const SIMPLE_DEV_PM_OPS', as that macro already constains a 'const' keyword:

drivers/input/keyboard/cros_ec_keyb.c:663:14: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
static const SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);

This removes the extra one.

Fixes 6af6dc2d2aa6 ("input: Add ChromeOS EC keyboard driver")

Applied, thank you.

Quoted 20 lines
---
 drivers/input/keyboard/cros_ec_keyb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/cros_ec_keyb.c +1 -1
index c7a8120b13c0..79eb29550c34 100644
@@ -660,7 +660,7 @@ static const struct of_device_id cros_ec_keyb_of_match[] = {
 MODULE_DEVICE_TABLE(of, cros_ec_keyb_of_match);
 #endif
 
-static const SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);
+static SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);
 
 static struct platform_driver cros_ec_keyb_driver = {
 	.probe = cros_ec_keyb_probe,
Signature · 1 line
2.9.0
Signature · 1 line
Dmitry