[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210827013415.24027-7-digetx@gmail.com>
Date: Fri, 27 Aug 2021 04:34:13 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Viresh Kumar <vireshk@...nel.org>,
Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>
Cc: linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: [PATCH v9 6/8] soc/tegra: Add devm_tegra_core_dev_init_opp_table_simple()
Only couple drivers need to get the -ENODEV error code and explicitly
initialize the performance state. Add new helper that allows to avoid
the extra boilerplate code in majority of drivers.
Signed-off-by: Dmitry Osipenko <digetx@...il.com>
---
include/soc/tegra/common.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/soc/tegra/common.h b/include/soc/tegra/common.h
index af41ad80ec21..265ad90e45a2 100644
--- a/include/soc/tegra/common.h
+++ b/include/soc/tegra/common.h
@@ -39,4 +39,17 @@ devm_tegra_core_dev_init_opp_table(struct device *dev,
}
#endif
+static inline int
+devm_tegra_core_dev_init_opp_table_simple(struct device *dev)
+{
+ struct tegra_core_opp_params params = {};
+ int err;
+
+ err = devm_tegra_core_dev_init_opp_table(dev, ¶ms);
+ if (err != -ENODEV)
+ return err;
+
+ return 0;
+}
+
#endif /* __SOC_TEGRA_COMMON_H__ */
--
2.32.0
Powered by blists - more mailing lists