From 794c02be950c0ea5b6286ecee0ce1d011be4ac22 Mon Sep 17 00:00:00 2001 From: Subbaraman Narayanamurthy Date: Wed, 22 Apr 2020 19:18:08 -0700 Subject: [PATCH] soc: qcom: service-locator: update types in get_service_location() Currently, get_service_location() expects "char *" for client name and service name from clients. Update this to "const char *" as they're not supposed to be changed by service locator. This also helps clients to pass a "const char *" when it reads strings from device tree using of_property_read_string_index(). Change-Id: I98d32524151b2486863e7fd51c56bc8f16262808 Signed-off-by: Subbaraman Narayanamurthy --- drivers/soc/qcom/service-locator.c | 2 +- include/soc/qcom/service-locator.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soc/qcom/service-locator.c b/drivers/soc/qcom/service-locator.c index 0fd96d2a9f3f..b275a5a11f18 100644 --- a/drivers/soc/qcom/service-locator.c +++ b/drivers/soc/qcom/service-locator.c @@ -295,7 +295,7 @@ inited: return rc; } -int get_service_location(char *client_name, char *service_name, +int get_service_location(const char *client_name, const char *service_name, struct notifier_block *locator_nb) { struct pd_qmi_client_data *pqcd; diff --git a/include/soc/qcom/service-locator.h b/include/soc/qcom/service-locator.h index 8ac27f52b2e6..1eac8c97bd50 100644 --- a/include/soc/qcom/service-locator.h +++ b/include/soc/qcom/service-locator.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2015-2016, 2018-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2016, 2018-2020, The Linux Foundation. All rights reserved. */ /* * Process Domain Service Locator API header @@ -63,7 +63,7 @@ struct notifier_block; * by the service locator. * Returns 0 on success; otherwise a value < 0 if no valid subsystem is found. */ -int get_service_location(char *client_name, char *service_name, +int get_service_location(const char *client_name, const char *service_name, struct notifier_block *locator_nb); /* @@ -77,8 +77,8 @@ int find_subsys(const char *pd_path, char *subsys); #else -static inline int get_service_location(char *client_name, - char *service_name, struct notifier_block *locator_nb) +static inline int get_service_location(const char *client_name, + const char *service_name, struct notifier_block *locator_nb) { return -ENODEV; }