Commit 126c9cb9 authored by Colin Ian King's avatar Colin Ian King Committed by Geert Uytterhoeven

pinctrl: rzn1: Make array reg_drive static, makes object smaller

Don't populate the array reg_drive on the stack but instead make it
static. Makes the object code smaller by 32 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  31991	  15696	      0	  47687	   ba47	drivers/pinctrl/pinctrl-rzn1.o

After:
   text	   data	    bss	    dec	    hex	filename
  31863	  15792	      0	  47655	   ba27	drivers/pinctrl/pinctrl-rzn1.o

(gcc version 9.2.1, amd64)
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20191007140559.11840-1-colin.king@canonical.comSigned-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 930d3a49
...@@ -487,7 +487,7 @@ static int rzn1_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin, ...@@ -487,7 +487,7 @@ static int rzn1_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
{ {
struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
enum pin_config_param param = pinconf_to_config_param(*config); enum pin_config_param param = pinconf_to_config_param(*config);
const u32 reg_drive[4] = { 4, 6, 8, 12 }; static const u32 reg_drive[4] = { 4, 6, 8, 12 };
u32 pull, drive, l1mux; u32 pull, drive, l1mux;
u32 l1, l2, arg = 0; u32 l1, l2, arg = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment