Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 794c02be authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

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: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent e18bfc16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+4 −4
Original line number Diff line number Diff line
/* 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;
}