aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/jz4740.c
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-25 00:52:22 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 10:52:43 +0100
commit1e572aa5686a6871eee7840e227f86e474cc7c2a (patch)
tree797de646221f0ad641c7f8b0476b55d170e71005 /drivers/usb/musb/jz4740.c
parentMerge 4.10-rc5 into usb-next (diff)
downloadlinux-dev-1e572aa5686a6871eee7840e227f86e474cc7c2a.tar.xz
linux-dev-1e572aa5686a6871eee7840e227f86e474cc7c2a.zip
usb: musb: constify musb_hdrc_config structures
Declare musb_hdrc_config structures as const as they are only stored in the config field of a musb_hdrc_platform_data structure. This field is of type const, so musb_hdrc_config structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct musb_hdrc_config x@p={...}; @ok@ struct musb_hdrc_platform_data pdata; identifier r.x; position p; @@ pdata.config=&x@p; @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct musb_hdrc_config x; File size before: text data bss dec hex filename 1212 338 0 1550 60e drivers/usb/musb/jz4740.o File size after: text data bss dec hex filename 1268 290 0 1558 616 drivers/usb/musb/jz4740.o File size before: text data bss dec hex filename 6151 333 16 6500 1964 drivers/usb/musb/sunxi.o File size after: text data bss dec hex filename 6215 269 16 6500 1964 drivers/usb/musb/sunxi.o File size before: text data bss dec hex filename 3668 864 0 4532 11b4 drivers/usb/musb/ux500.o File size after: text data bss dec hex filename 3724 808 0 4532 11b4 drivers/usb/musb/ux500.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/jz4740.c')
-rw-r--r--drivers/usb/musb/jz4740.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
index bc8889956d17..40c68c23d553 100644
--- a/drivers/usb/musb/jz4740.c
+++ b/drivers/usb/musb/jz4740.c
@@ -63,7 +63,7 @@ static struct musb_fifo_cfg jz4740_musb_fifo_cfg[] = {
{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, },
};
-static struct musb_hdrc_config jz4740_musb_config = {
+static const struct musb_hdrc_config jz4740_musb_config = {
/* Silicon does not implement USB OTG. */
.multipoint = 0,
/* Max EPs scanned, driver will decide which EP can be used. */