summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorPetr Kulhavy2016-02-24 16:27:16 +0100
committerFelipe Balbi2016-03-04 14:14:46 +0100
commitead22caf8507c0533aab6b89e26776414b477b6f (patch)
tree17bddcfc475fc80ddf2deea4e7a781aceba0466a /drivers/usb/musb/musb_core.c
parentusb: dwc2: Move host-specific core functions into hcd.c (diff)
downloadkernel-qcow2-linux-ead22caf8507c0533aab6b89e26776414b477b6f.tar.gz
kernel-qcow2-linux-ead22caf8507c0533aab6b89e26776414b477b6f.tar.xz
kernel-qcow2-linux-ead22caf8507c0533aab6b89e26776414b477b6f.zip
usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config
The musb_hdrc_platform_data::config was defined as a non-const pointer. However some drivers (e.g. the ux500) set up this pointer to point to a static structure, which is potentially dangerous. Since the musb core uses the pointer in a read-only manner the const qualifier was added to protect the content of the config. Signed-off-by: Petr Kulhavy <petr@barix.com> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c3791a01ab31..39fd95833eb8 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1901,7 +1901,7 @@ static void musb_recover_from_babble(struct musb *musb)
*/
static struct musb *allocate_instance(struct device *dev,
- struct musb_hdrc_config *config, void __iomem *mbase)
+ const struct musb_hdrc_config *config, void __iomem *mbase)
{
struct musb *musb;
struct musb_hw_ep *ep;