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

video: fbdev: savage: 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
19916 1240 8 21164 52ac fbdev/savage/savagefb_driver.o

File size after adding 'const':
text data bss dec hex filename
20684 472 8 21164 52ac fbdev/savage/savagefb_driver.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
4d7247d1 6e8e55a9

+1 -1
+1 -1
drivers/video/fbdev/savage/savagefb_driver.c
··· 2429 2429 } 2430 2430 2431 2431 2432 - static struct pci_device_id savagefb_devices[] = { 2432 + static const struct pci_device_id savagefb_devices[] = { 2433 2433 {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128, 2434 2434 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE}, 2435 2435