interconnect: constify of_phandle_args in xlate

The xlate callbacks are supposed to translate of_phandle_args to proper
provider without modifying the of_phandle_args.  Make the argument
pointer to const for code safety and readability.

Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com> # Tegra
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Alim Akhtar <alim.akhtar@samsung.com> # Samsung
Link: https://lore.kernel.org/r/20240220072213.35779-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
This commit is contained in:
Krzysztof Kozlowski
2024-02-20 08:22:13 +01:00
committed by Georgi Djakov
parent 64eec95820
commit 0dc5b8abfa
14 changed files with 25 additions and 21 deletions
+2 -2
View File
@@ -343,7 +343,7 @@ EXPORT_SYMBOL_GPL(icc_std_aggregate);
* an array of icc nodes specified in the icc_onecell_data struct when
* registering the provider.
*/
struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
struct icc_node *of_icc_xlate_onecell(const struct of_phandle_args *spec,
void *data)
{
struct icc_onecell_data *icc_data = data;
@@ -368,7 +368,7 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
* Returns a valid pointer to struct icc_node_data on success or ERR_PTR()
* on failure.
*/
struct icc_node_data *of_icc_get_from_provider(struct of_phandle_args *spec)
struct icc_node_data *of_icc_get_from_provider(const struct of_phandle_args *spec)
{
struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
struct icc_node_data *data = NULL;
+2 -1
View File
@@ -9,7 +9,8 @@
#include "icc-common.h"
struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data)
struct icc_node_data *qcom_icc_xlate_extended(const struct of_phandle_args *spec,
void *data)
{
struct icc_node_data *ndata;
struct icc_node *node;
+2 -1
View File
@@ -8,6 +8,7 @@
#include <linux/interconnect-provider.h>
struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data);
struct icc_node_data *qcom_icc_xlate_extended(const struct of_phandle_args *spec,
void *data);
#endif
+1 -1
View File
@@ -82,7 +82,7 @@ static int exynos_generic_icc_set(struct icc_node *src, struct icc_node *dst)
return 0;
}
static struct icc_node *exynos_generic_icc_xlate(struct of_phandle_args *spec,
static struct icc_node *exynos_generic_icc_xlate(const struct of_phandle_args *spec,
void *data)
{
struct exynos_icc_priv *priv = data;