linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc/platforms/83xx/suspend: Reorder to get rid of a forward declaration
@ 2022-07-07  6:14 Uwe Kleine-König
  2022-07-07  6:14 ` [PATCH 2/3] powerpc/platforms/83xx/suspend: Prevent unloading the driver Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2022-07-07  6:14 UTC (permalink / raw)
  To: Scott Wood, Michael Ellerman; +Cc: kernel, Paul Mackerras, linuxppc-dev

By moving up pmc_types and pmc_match, the forward declaration for pmc_match
can be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/powerpc/platforms/83xx/suspend.c | 43 +++++++++++++--------------
 1 file changed, 21 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 6d47a5b81485..30b7700a2c98 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -319,7 +319,27 @@ static const struct platform_suspend_ops mpc83xx_suspend_ops = {
 	.end = mpc83xx_suspend_end,
 };
 
-static const struct of_device_id pmc_match[];
+static struct pmc_type pmc_types[] = {
+	{
+		.has_deep_sleep = 1,
+	},
+	{
+		.has_deep_sleep = 0,
+	}
+};
+
+static const struct of_device_id pmc_match[] = {
+	{
+		.compatible = "fsl,mpc8313-pmc",
+		.data = &pmc_types[0],
+	},
+	{
+		.compatible = "fsl,mpc8349-pmc",
+		.data = &pmc_types[1],
+	},
+	{}
+};
+
 static int pmc_probe(struct platform_device *ofdev)
 {
 	struct device_node *np = ofdev->dev.of_node;
@@ -406,27 +426,6 @@ static int pmc_remove(struct platform_device *ofdev)
 	return -EPERM;
 };
 
-static struct pmc_type pmc_types[] = {
-	{
-		.has_deep_sleep = 1,
-	},
-	{
-		.has_deep_sleep = 0,
-	}
-};
-
-static const struct of_device_id pmc_match[] = {
-	{
-		.compatible = "fsl,mpc8313-pmc",
-		.data = &pmc_types[0],
-	},
-	{
-		.compatible = "fsl,mpc8349-pmc",
-		.data = &pmc_types[1],
-	},
-	{}
-};
-
 static struct platform_driver pmc_driver = {
 	.driver = {
 		.name = "mpc83xx-pmc",

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-29 13:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07  6:14 [PATCH 1/3] powerpc/platforms/83xx/suspend: Reorder to get rid of a forward declaration Uwe Kleine-König
2022-07-07  6:14 ` [PATCH 2/3] powerpc/platforms/83xx/suspend: Prevent unloading the driver Uwe Kleine-König
2022-07-07  8:44   ` Christophe Leroy
2022-07-15 18:41   ` Scott Wood
2022-07-07  6:14 ` [PATCH 3/3] powerpc/platforms/83xx/suspend: Remove write-only global variable Uwe Kleine-König
2022-07-07  8:49   ` Christophe Leroy
2022-07-07  8:43 ` [PATCH 1/3] powerpc/platforms/83xx/suspend: Reorder to get rid of a forward declaration Christophe Leroy
2022-07-29 13:03 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).