aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl/freescale
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-09-02 13:59:20 +0200
committerLinus Walleij <linus.walleij@linaro.org>2025-09-08 14:22:41 +0200
commitd57b7979ea4c43655e8772b91cbac0f613419f4a (patch)
tree914fcc66b6dfb460556b5856d8e90f2f3977dbed /drivers/pinctrl/freescale
parentfbba4a9e368f6ec521043ae4035edb2b74ed12e4 (diff)
pinctrl: make struct pinfunction a pointer in struct function_desc
We currently duplicate the entire struct pinfunction object in pinmux_generic_add_pinfunction(). While this is inevitable when the arguments come in split through pinmux_generic_add_function(), users of pinmux_generic_add_pinfunction() will typically pass addresses of structures in .rodata, meaning we can try to avoid the duplication with the help from kmemdup_const(). To that end: don't wrap the entire struct pinfunction in struct function_desc but rather just store the address. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/freescale')
-rw-r--r--drivers/pinctrl/freescale/pinctrl-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 39c582a25d8f..731c58ad43ee 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -266,7 +266,7 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
npins = grp->grp.npins;
dev_dbg(ipctl->dev, "enable function %s group %s\n",
- func->func.name, grp->grp.name);
+ func->func->name, grp->grp.name);
for (i = 0; i < npins; i++) {
/*