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

Commit d2286074 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: pil: allow to set subsystem firmware name"

parents 50ad11fb 5a5b5183
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -746,6 +746,28 @@ static void subsys_stop(struct subsys_device *subsys)
	notify_each_subsys_device(&subsys, 1, SUBSYS_AFTER_SHUTDOWN, NULL);
}

int subsystem_set_fwname(const char *name, const char *fw_name)
{
	struct subsys_device *subsys;

	if (!name)
		return -EINVAL;

	if (!fw_name)
		return -EINVAL;

	subsys = find_subsys(name);
	if (!subsys)
		return -EINVAL;

	pr_debug("Changing subsys [%s] fw_name to [%s]\n", name, fw_name);
	strlcpy(subsys->desc->fw_name, fw_name,
		sizeof(subsys->desc->fw_name));

	return 0;
}
EXPORT_SYMBOL(subsystem_set_fwname);

void *__subsystem_get(const char *name, const char *fw_name)
{
	struct subsys_device *subsys;
+6 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ extern int subsystem_crashed(const char *name);

extern void *subsystem_get(const char *name);
extern void *subsystem_get_with_fwname(const char *name, const char *fw_name);
extern int subsystem_set_fwname(const char *name, const char *fw_name);
extern void subsystem_put(void *subsystem);

extern struct subsys_device *subsys_register(struct subsys_desc *desc);
@@ -157,6 +158,11 @@ static inline void *subsystem_get_with_fwname(const char *name,
	return NULL;
}

static inline int subsystem_set_fwname(const char *name,
				const char *fw_name) {
	return 0;
}

static inline void subsystem_put(void *subsystem) { }

static inline