public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: uvcvideo: Make some structs const
@ 2017-11-04 17:23 Joe Perches
  2018-08-06 22:21 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2017-11-04 17:23 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

Move some data to text

$ size drivers/media/usb/uvc/uvc_ctrl.o*
   text	   data	    bss	    dec	    hex	filename
  34323	   2364	      0	  36687	   8f4f	drivers/media/usb/uvc/uvc_ctrl.o.new
  28659	   8028	      0	  36687	   8f4f	drivers/media/usb/uvc/uvc_ctrl.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/media/usb/uvc/uvc_ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 20397aba6849..44a0554bf62d 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -37,7 +37,7 @@
  * Controls
  */
 
-static struct uvc_control_info uvc_ctrls[] = {
+static const struct uvc_control_info uvc_ctrls[] = {
 	{
 		.entity		= UVC_GUID_UVC_PROCESSING,
 		.selector	= UVC_PU_BRIGHTNESS_CONTROL,
@@ -420,7 +420,7 @@ static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping,
 	data[first+1] = min_t(int, abs(value), 0xff);
 }
 
-static struct uvc_control_mapping uvc_ctrl_mappings[] = {
+static const struct uvc_control_mapping uvc_ctrl_mappings[] = {
 	{
 		.id		= V4L2_CID_BRIGHTNESS,
 		.name		= "Brightness",
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-07  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-04 17:23 [PATCH] media: uvcvideo: Make some structs const Joe Perches
2018-08-06 22:21 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox