Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: s3fb: constify pci_device_id.

pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

File size before:
text data bss dec hex filename
20994 2440 8 23442 5b92 drivers/video/fbdev/s3fb.o

File size after adding 'const':
text data bss dec hex filename
21506 1928 8 23442 5b92 drivers/video/fbdev/s3fb.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Maik Broemme <mbroemme@libmpq.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Arvind Yadav and committed by
Bartlomiej Zolnierkiewicz
916f0ecf 40fce960

+1 -1
+1 -1
drivers/video/fbdev/s3fb.c
··· 1483 1483 1484 1484 /* List of boards that we are trying to support */ 1485 1485 1486 - static struct pci_device_id s3_devices[] = { 1486 + static const struct pci_device_id s3_devices[] = { 1487 1487 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO}, 1488 1488 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO}, 1489 1489 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},