usb: musb: constify dev_pm_ops structures
PATCH 1/1 usb: musb: constify dev_pm_ops structures
Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too.
Size details after cross compiling the .o file for arm architecture.
File size before: drivers/usb/musb/omap2430.o
text data bss dec hex filename
4141 400 8 4549 11c5 usb/musb/omap2430.o
File size after: drivers/usb/musb/omap2430.o
text data bss dec hex filename
4333 200 8 4541 11bd usb/musb/omap2430.o
--- drivers/usb/musb/omap2430.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/omap2430.c +1 -1
@@ -575,7 +575,7 @@ static int omap2430_runtime_resume(struct device *dev)return 0 ; } -static struct dev_pm_ops omap2430_pm_ops = { +static const struct dev_pm_ops omap2430_pm_ops = { .runtime_suspend = omap2430_runtime_suspend, .runtime_resume = omap2430_runtime_resume, };
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1484481646-28544-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Bin Liu
AppliedQuoted 12 lines · Bhumika Goyal
Declare
dev_pm_opsstructures as const as they are only stored in the pm field of adevice_driverstructure. This field is of type const, sodev_pm_opsstructures having similar properties can be declared const too.Size details after cross compiling the .o file for arm architecture.
File size before:
drivers/usb/musb/omap2430.o
text data bss dec hex filename
4141 400 8 4549 11c5usb/musb/omap2430.o
Quoted 5 lines
File size after:
drivers/usb/musb/omap2430.o
text data bss dec hex filename
4333 200 8 4541 11bdusb/musb/omap2430.oSigned-off-by Bhumika Goyal <[email protected]>
Applied. Thanks.
[[email protected]: added omap2430 in commit subject prefix]
-Bin.
Quoted 20 lines
--- drivers/usb/musb/omap2430.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/musb/omap2430.c +1
-1@@ -575,7 +575,7 @@ static int omap2430_runtime_resume(struct device *dev)return 0 ; } -static struct dev_pm_ops omap2430_pm_ops = { +static const struct dev_pm_ops omap2430_pm_ops = { .runtime_suspend = omap2430_runtime_suspend, .runtime_resume = omap2430_runtime_resume, };Signature · 1 line
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html