[PATCH 1/4] misc: rtsx_usb: Constify struct usb_device_id

From: Rikard Falkeborn
Date: Wed Jun 10 2020 - 18:47:40 EST


rtsx_usb_usb_ids is never modified and can therefore be made const to
allow the compiler to put it in read-only memory.

Before:
text data bss dec hex filename
21513 4160 128 25801 64c9 drivers/misc/cardreader/rtsx_usb.o

After:
text data bss dec hex filename
21673 4000 128 25801 64c9 drivers/misc/cardreader/rtsx_usb.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@xxxxxxxxx>
---
drivers/misc/cardreader/rtsx_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/cardreader/rtsx_usb.c b/drivers/misc/cardreader/rtsx_usb.c
index a328cab11014..59eda55d92a3 100644
--- a/drivers/misc/cardreader/rtsx_usb.c
+++ b/drivers/misc/cardreader/rtsx_usb.c
@@ -759,7 +759,7 @@ static int rtsx_usb_post_reset(struct usb_interface *intf)
return 0;
}

-static struct usb_device_id rtsx_usb_usb_ids[] = {
+static const struct usb_device_id rtsx_usb_usb_ids[] = {
{ USB_DEVICE(0x0BDA, 0x0129) },
{ USB_DEVICE(0x0BDA, 0x0139) },
{ USB_DEVICE(0x0BDA, 0x0140) },
--
2.27.0