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

drm/tilcdc: tilcdc_tfp410: make of_device_ids const.

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

File size before:
text data bss dec hex filename
1496 592 0 2088 828 drivers/gpu/drm/tilcdc/tilcdc_tfp410.o

File size after constify:
text data bss dec hex filename
1880 176 0 2056 808 drivers/gpu/drm/tilcdc/tilcdc_tfp410.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>

authored by

Arvind Yadav and committed by
Jyri Sarha
cafdee68 21173552

+1 -3
+1 -3
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
··· 289 289 * Device: 290 290 */ 291 291 292 - static struct of_device_id tfp410_of_match[]; 293 - 294 292 static int tfp410_probe(struct platform_device *pdev) 295 293 { 296 294 struct device_node *node = pdev->dev.of_node; ··· 373 375 return 0; 374 376 } 375 377 376 - static struct of_device_id tfp410_of_match[] = { 378 + static const struct of_device_id tfp410_of_match[] = { 377 379 { .compatible = "ti,tilcdc,tfp410", }, 378 380 { }, 379 381 };