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

Commit a3c82028 authored by Sujeev Dias's avatar Sujeev Dias Committed by Gerrit - the friendly Code Review server
Browse files

mhi: core: use fixed-length string for mhi_device_id



If we don't use a fixed-length string, dynamically loadable
modules related to MHI will not load properly.

CRs-Fixed: 2258358
Change-Id: Ice7c6d42c26807a5085e22b44451f57d6edf81dd
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent a5c630bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ static int mhi_dtr_probe(struct mhi_device *mhi_dev,

static const struct mhi_device_id mhi_dtr_table[] = {
	{ .chan = "IP_CTRL" },
	{ NULL },
	{},
};

static struct mhi_driver mhi_dtr_driver = {
+1 −1
Original line number Diff line number Diff line
@@ -1283,7 +1283,7 @@ static int mhi_match(struct device *dev, struct device_driver *drv)
	if (mhi_dev->dev_type == MHI_CONTROLLER_TYPE)
		return 0;

	for (id = mhi_drv->id_table; id->chan; id++)
	for (id = mhi_drv->id_table; id->chan[0]; id++)
		if (!strcmp(mhi_dev->chan_name, id->chan)) {
			mhi_dev->id = id;
			return 1;
+1 −1
Original line number Diff line number Diff line
@@ -977,7 +977,7 @@ static int mhi_netdev_probe(struct mhi_device *mhi_dev,
static const struct mhi_device_id mhi_netdev_match_table[] = {
	{ .chan = "IP_HW0" },
	{ .chan = "IP_HW_ADPL" },
	{ NULL },
	{},
};

static struct mhi_driver mhi_netdev_driver = {
+1 −1
Original line number Diff line number Diff line
@@ -655,7 +655,7 @@ static const struct mhi_device_id mhi_uci_match_table[] = {
	{ .chan = "TF", .driver_data = 0x1000 },
	{ .chan = "BL", .driver_data = 0x1000 },
	{ .chan = "DUN", .driver_data = 0x1000 },
	{ NULL },
	{},
};

static struct mhi_driver mhi_uci_driver = {
+1 −1
Original line number Diff line number Diff line
@@ -720,7 +720,7 @@ void diag_mhi_exit(void)
static const struct mhi_device_id diag_mhi_match_table[] = {
	{ .chan = "DIAG", .driver_data = MHI_1 },
	{ .chan = "DCI", .driver_data = MHI_DCI_1 },
	{NULL},
	{},
};

static struct mhi_driver diag_mhi_driver = {
Loading