aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorPetr Kulhavy <petr@barix.com>2016-02-24 10:27:16 -0500
committerFelipe Balbi <balbi@kernel.org>2016-03-04 08:14:46 -0500
commitead22caf8507c0533aab6b89e26776414b477b6f (patch)
tree17bddcfc475fc80ddf2deea4e7a781aceba0466a /include/linux/usb
parentb02038faa7f1b228983d05633c8345f826b20042 (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 'include/linux/usb')
-rw-r--r--include/linux/usb/musb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 96ddfb7ab018..0b3da40a525e 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -124,7 +124,7 @@ struct musb_hdrc_platform_data {
124 int (*set_power)(int state); 124 int (*set_power)(int state);
125 125
126 /* MUSB configuration-specific details */ 126 /* MUSB configuration-specific details */
127 struct musb_hdrc_config *config; 127 const struct musb_hdrc_config *config;
128 128
129 /* Architecture specific board data */ 129 /* Architecture specific board data */
130 void *board_data; 130 void *board_data;