summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2020-08-20 14:26:04 +0000
committerAndrey Zhizhikin <andrey.z@gmail.com>2020-08-20 14:26:04 +0000
commitb66890eae17a10b50a94472de6ed095ff8ebd315 (patch)
tree27a2be46771b907d0f6bc78825ad9d1e8b72477b /drivers/pinctrl
parent397a487c917f91e3fbca6c9a1a5bffb779d42e76 (diff)
parentf61e1c3638dddaa1a1f3bb59d2bc288d9f0f1b5b (diff)
Merge tag 'v5.4.59' into 5.4-2.1.x-imx
This is the 5.4.59 stable release Conflicts (manual resolve): drivers/gpu/drm/imx/dw_hdmi-imx.c: drivers/gpu/drm/imx/imx-ldb.c: drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c: Port changes from upstream commit [1a279871012d3], which extends component lifetime by moving drm structures allocation/free from bind() to probe(). sound/soc/fsl/fsl_sai.c: Apply patch [b8ae2bf5ccc66] from upstream, which uses FIFO watermark mask macro. Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-single.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 1e0614daee9b..a9d511982780 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -916,7 +916,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
/* If pinconf isn't supported, don't parse properties in below. */
if (!PCS_HAS_PINCONF)
- return 0;
+ return -ENOTSUPP;
/* cacluate how much properties are supported in current node */
for (i = 0; i < ARRAY_SIZE(prop2); i++) {
@@ -928,7 +928,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
nconfs++;
}
if (!nconfs)
- return 0;
+ return -ENOTSUPP;
func->conf = devm_kcalloc(pcs->dev,
nconfs, sizeof(struct pcs_conf_vals),
@@ -1056,9 +1056,12 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
if (PCS_HAS_PINCONF && function) {
res = pcs_parse_pinconf(pcs, np, function, map);
- if (res)
+ if (res == 0)
+ *num_maps = 2;
+ else if (res == -ENOTSUPP)
+ *num_maps = 1;
+ else
goto free_pingroups;
- *num_maps = 2;
} else {
*num_maps = 1;
}