mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 23:39:18 +00:00
pinctrl: single: Fix build error
If pcs->is_pinconf is false, it means does not support pinconf. If pcs->is_pinconf is true, is_generic flag is always true. This patch fixes below build error: CC [M] drivers/pinctrl/pinctrl-single.o drivers/pinctrl/pinctrl-single.c: In function 'pcs_probe': drivers/pinctrl/pinctrl-single.c:1441:3: error: assignment of member 'is_generic' in read-only object make[2]: *** [drivers/pinctrl/pinctrl-single.o] Error 1 make[1]: *** [drivers/pinctrl] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
32378ab781
commit
a7bbdd7f80
@ -734,6 +734,7 @@ static const struct pinconf_ops pcs_pinconf_ops = {
|
|||||||
.pin_config_dbg_show = pcs_pinconf_dbg_show,
|
.pin_config_dbg_show = pcs_pinconf_dbg_show,
|
||||||
.pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
|
.pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
|
||||||
.pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
|
.pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
|
||||||
|
.is_generic = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1435,10 +1436,9 @@ static int pcs_probe(struct platform_device *pdev)
|
|||||||
pcs->desc.name = DRIVER_NAME;
|
pcs->desc.name = DRIVER_NAME;
|
||||||
pcs->desc.pctlops = &pcs_pinctrl_ops;
|
pcs->desc.pctlops = &pcs_pinctrl_ops;
|
||||||
pcs->desc.pmxops = &pcs_pinmux_ops;
|
pcs->desc.pmxops = &pcs_pinmux_ops;
|
||||||
pcs->desc.confops = &pcs_pinconf_ops;
|
if (pcs->is_pinconf)
|
||||||
|
pcs->desc.confops = &pcs_pinconf_ops;
|
||||||
pcs->desc.owner = THIS_MODULE;
|
pcs->desc.owner = THIS_MODULE;
|
||||||
if (match->data)
|
|
||||||
pcs_pinconf_ops.is_generic = true;
|
|
||||||
|
|
||||||
ret = pcs_allocate_pin_table(pcs);
|
ret = pcs_allocate_pin_table(pcs);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user