diff options
author | Petr Kulhavy <petr@barix.com> | 2016-02-24 16:27:16 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 15:14:46 +0200 |
commit | ead22caf8507c0533aab6b89e26776414b477b6f (patch) | |
tree | 17bddcfc475fc80ddf2deea4e7a781aceba0466a /drivers/usb/musb/musb_core.h | |
parent | b02038faa7f1b228983d05633c8345f826b20042 (diff) |
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.h')
-rw-r--r-- | drivers/usb/musb/musb_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index fd215fb45fd4..b6afe9e43305 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -438,7 +438,7 @@ struct musb { */ unsigned double_buffer_not_ok:1; - struct musb_hdrc_config *config; + const struct musb_hdrc_config *config; int xceiv_old_state; #ifdef CONFIG_DEBUG_FS |