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

Commit 7e81da85 authored by Hanumant Singh's avatar Hanumant Singh
Browse files

esoc: Modify probe to include driver instance



Modify esoc driver probe definition to pass back
not only the matches esoc control link but also
the corresponding driver instance to allow for
a module to register multiple driver instances.

Change-Id: I5257a537b00acf5ef6be6cec9dd29324c4b76f81
Signed-off-by: default avatarHanumant Singh <hanumant@codeaurora.org>
parent 090e59ba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -203,7 +203,7 @@ static int mdm_register_ssr(struct esoc_clink *esoc_clink)
	return esoc_clink_register_ssr(esoc_clink);
}

int esoc_ssr_probe(struct esoc_clink *esoc_clink)
int esoc_ssr_probe(struct esoc_clink *esoc_clink, struct esoc_drv *drv)
{
	int ret;
	struct mdm_drv *mdm_drv;
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -112,7 +112,8 @@ struct esoc_drv {
	struct module *owner;
	struct esoc_compat *compat_table;
	unsigned int compat_entries;
	int (*probe)(struct esoc_clink *esoc_clink);
	int (*probe)(struct esoc_clink *esoc_clink,
				struct esoc_drv *drv);
};

#define to_esoc_clink(d) container_of(d, struct esoc_clink, dev)
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -60,7 +60,7 @@ static int esoc_bus_probe(struct device *dev)
	struct esoc_clink *esoc_clink = to_esoc_clink(dev);
	struct esoc_drv *esoc_drv = to_esoc_drv(dev->driver);

	ret = esoc_drv->probe(esoc_clink);
	ret = esoc_drv->probe(esoc_clink, esoc_drv);
	if (ret) {
		pr_err("failed to probe %s dev\n", esoc_clink->name);
		return ret;