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 <subbaram@codeaurora.org>
This commit is contained in:
Subbaraman Narayanamurthy 2020-04-22 19:18:08 -07:00
parent e18bfc1698
commit 794c02be95
2 changed files with 5 additions and 5 deletions

View File

@ -295,7 +295,7 @@ static int init_service_locator(void)
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;

View File

@ -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;
}