Skip to content

Commit

Permalink
watchdog: cadence_wdt: make of_device_ids const.
Browse files Browse the repository at this point in the history
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
   1962	    612	      4	   2578	    a12	drivers/watchdog/cadence_wdt.o

File size after constify cdns_wdt_of_match:
   text	   data	    bss	    dec	    hex	filename
   2378	    196	      4	   2578	    a12	drivers/watchdog/cadence_wdt.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Arvind Yadav authored and Wim Van Sebroeck committed Jul 3, 2017
1 parent 935988c commit 011e29e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/cadence_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static int __maybe_unused cdns_wdt_resume(struct device *dev)

static SIMPLE_DEV_PM_OPS(cdns_wdt_pm_ops, cdns_wdt_suspend, cdns_wdt_resume);

static struct of_device_id cdns_wdt_of_match[] = {
static const struct of_device_id cdns_wdt_of_match[] = {
{ .compatible = "cdns,wdt-r1p2", },
{ /* end of table */ }
};
Expand Down

0 comments on commit 011e29e

Please sign in to comment.