[PATCH] PM / devfreq: tegra30: use designated initializers for tegra_actmon_emc_ratio

Thorsten Blum posted 1 patch 2 weeks, 3 days ago
drivers/devfreq/tegra30-devfreq.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
[PATCH] PM / devfreq: tegra30: use designated initializers for tegra_actmon_emc_ratio
Posted by Thorsten Blum 2 weeks, 3 days ago
Switch actmon_emc_ratios[] to the more modern and flexible designated
initializers. This improves readability and allows struct fields to be
reordered.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/devfreq/tegra30-devfreq.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
index 4a4f0106ab9d..890990e03335 100644
--- a/drivers/devfreq/tegra30-devfreq.c
+++ b/drivers/devfreq/tegra30-devfreq.c
@@ -206,13 +206,13 @@ struct tegra_actmon_emc_ratio {
 };
 
 static const struct tegra_actmon_emc_ratio actmon_emc_ratios[] = {
-	{ 1400000,    KHZ_MAX },
-	{ 1200000,    750000 },
-	{ 1100000,    600000 },
-	{ 1000000,    500000 },
-	{  800000,    375000 },
-	{  500000,    200000 },
-	{  250000,    100000 },
+	{ .cpu_freq = 1400000, .emc_freq = KHZ_MAX },
+	{ .cpu_freq = 1200000, .emc_freq = 750000 },
+	{ .cpu_freq = 1100000, .emc_freq = 600000 },
+	{ .cpu_freq = 1000000, .emc_freq = 500000 },
+	{ .cpu_freq =  800000, .emc_freq = 375000 },
+	{ .cpu_freq =  500000, .emc_freq = 200000 },
+	{ .cpu_freq =  250000, .emc_freq = 100000 },
 };
 
 static u32 actmon_readl(struct tegra_devfreq *tegra, u32 offset)
-- 
2.51.0