mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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: Sujeev Dias <sdias@codeaurora.org>
This commit is contained in:
parent
a5c630bb28
commit
a3c82028fa
@ -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 = {
|
||||
|
@ -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;
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -421,7 +421,7 @@ err:
|
||||
|
||||
static const struct mhi_device_id qdss_mhi_match_table[] = {
|
||||
{ .chan = "QDSS" },
|
||||
{ NULL },
|
||||
{},
|
||||
};
|
||||
|
||||
static struct mhi_driver qdss_mhi_driver = {
|
||||
|
@ -705,6 +705,8 @@ struct fsl_mc_device_id {
|
||||
const char obj_type[16];
|
||||
};
|
||||
|
||||
#define MHI_NAME_SIZE 32
|
||||
|
||||
/**
|
||||
* struct mhi_device_id - MHI device identification
|
||||
* @chan: MHI channel name
|
||||
@ -712,7 +714,7 @@ struct fsl_mc_device_id {
|
||||
*/
|
||||
|
||||
struct mhi_device_id {
|
||||
const char *chan;
|
||||
const char chan[MHI_NAME_SIZE];
|
||||
kernel_ulong_t driver_data;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user