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 <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126898
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
This commit is contained in:
Jon Hunter
2024-04-26 16:49:47 +01:00
committed by mobile promotions
parent 0313251d13
commit ac51641cf1

View File

@@ -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)
};