diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-03-04 00:47:39 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-03-06 23:27:31 -0500 |
commit | a7bbdd7f8065b97108830662b31c18fc67449c87 (patch) | |
tree | 05184d400d578f7c674bd3db9cafd025db5061e1 /drivers/pinctrl/pinctrl-single.c | |
parent | 32378ab781e3e5da6e25c51e452a43e21fbabb3a (diff) |
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 4cdcf8582764..e35dabd3135d 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c | |||
@@ -734,6 +734,7 @@ static const struct pinconf_ops pcs_pinconf_ops = { | |||
734 | .pin_config_dbg_show = pcs_pinconf_dbg_show, | 734 | .pin_config_dbg_show = pcs_pinconf_dbg_show, |
735 | .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show, | 735 | .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show, |
736 | .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show, | 736 | .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show, |
737 | .is_generic = true, | ||
737 | }; | 738 | }; |
738 | 739 | ||
739 | /** | 740 | /** |
@@ -1435,10 +1436,9 @@ static int pcs_probe(struct platform_device *pdev) | |||
1435 | pcs->desc.name = DRIVER_NAME; | 1436 | pcs->desc.name = DRIVER_NAME; |
1436 | pcs->desc.pctlops = &pcs_pinctrl_ops; | 1437 | pcs->desc.pctlops = &pcs_pinctrl_ops; |
1437 | pcs->desc.pmxops = &pcs_pinmux_ops; | 1438 | pcs->desc.pmxops = &pcs_pinmux_ops; |
1438 | pcs->desc.confops = &pcs_pinconf_ops; | 1439 | if (pcs->is_pinconf) |
1440 | pcs->desc.confops = &pcs_pinconf_ops; | ||
1439 | pcs->desc.owner = THIS_MODULE; | 1441 | pcs->desc.owner = THIS_MODULE; |
1440 | if (match->data) | ||
1441 | pcs_pinconf_ops.is_generic = true; | ||
1442 | 1442 | ||
1443 | ret = pcs_allocate_pin_table(pcs); | 1443 | ret = pcs_allocate_pin_table(pcs); |
1444 | if (ret < 0) | 1444 | if (ret < 0) |