summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2020-09-29 20:52:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-02 12:33:47 +0300
commitf38173a731cae380885e843dace21c8dc4198285 (patch)
tree0437079f517ddb3377c36400ec7c6298e7ab2e3b /drivers/bus
parentf42dfbe8f712127031e7b9bc938a1c33cec2ff57 (diff)
downloadlinux-f38173a731cae380885e843dace21c8dc4198285.tar.xz
bus: mhi: core: Add const qualifier to MHI config information
MHI channel, event and controller config data needs to be treated read only information. Add const qualifier to make sure config information passed by MHI controller is not modified by MHI core driver. Suggested-by: Kalle Valo <kvalo@codeaurora.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20200929175218.8178-12-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/mhi/core/init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index f69a2f3d039d..d23293876be8 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -562,10 +562,10 @@ int mhi_init_chan_ctxt(struct mhi_controller *mhi_cntrl,
}
static int parse_ev_cfg(struct mhi_controller *mhi_cntrl,
- struct mhi_controller_config *config)
+ const struct mhi_controller_config *config)
{
struct mhi_event *mhi_event;
- struct mhi_event_config *event_cfg;
+ const struct mhi_event_config *event_cfg;
struct device *dev = &mhi_cntrl->mhi_dev->dev;
int i, num;
@@ -648,9 +648,9 @@ error_ev_cfg:
}
static int parse_ch_cfg(struct mhi_controller *mhi_cntrl,
- struct mhi_controller_config *config)
+ const struct mhi_controller_config *config)
{
- struct mhi_channel_config *ch_cfg;
+ const struct mhi_channel_config *ch_cfg;
struct device *dev = &mhi_cntrl->mhi_dev->dev;
int i;
u32 chan;
@@ -766,7 +766,7 @@ error_chan_cfg:
}
static int parse_config(struct mhi_controller *mhi_cntrl,
- struct mhi_controller_config *config)
+ const struct mhi_controller_config *config)
{
int ret;
@@ -803,7 +803,7 @@ error_ev_cfg:
}
int mhi_register_controller(struct mhi_controller *mhi_cntrl,
- struct mhi_controller_config *config)
+ const struct mhi_controller_config *config)
{
struct mhi_event *mhi_event;
struct mhi_chan *mhi_chan;