mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Acked-by: Sergei Shtylyov <[email protected]> Signed-off-by: Bin Liu <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
b02038faa7
commit
ead22caf85
3 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue