From ac51641cf1024f2b32294abd87144fc7010f51ad Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 26 Apr 2024 16:49:47 +0100 Subject: [PATCH] tsec: Fix build with -Werror=old-style-declaration When the tsec driver is built with the compiler flag -Werror=old-style-declaration the following error is observed ... error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 393 | const static struct dev_pm_ops tsec_module_pm_ops = { | ^~~~~ This is observed with the latest linux-next kernels, but could be observed with any kernel where this flag is set. Fix this by ensuring that the 'static' keyword is declared first. Bug 4593750 Change-Id: Ia635188569d827d361bd36f7be943fbf9f1f0a60 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126898 GVS: Gerrit_Virtual_Submit Reviewed-by: Brad Griffis --- drivers/video/tegra/tsec/tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/tegra/tsec/tsec.c b/drivers/video/tegra/tsec/tsec.c index bce55df8..1f1218c5 100644 --- a/drivers/video/tegra/tsec/tsec.c +++ b/drivers/video/tegra/tsec/tsec.c @@ -390,7 +390,7 @@ static int tsec_module_init(struct platform_device *dev) } -const static struct dev_pm_ops tsec_module_pm_ops = { +static const struct dev_pm_ops tsec_module_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(tsec_module_suspend, tsec_module_resume) };