summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-10-25 09:09:00 -0700
committerLinus Walleij <linus.walleij@linaro.org>2016-10-28 13:54:00 +0200
commitcd23604a4b2575c7d6786a3d6cd29d79941a5542 (patch)
tree44a9aa6c178a85bab86a8a7df82b1446725cbba9 /drivers
parent223decc457c992976e4d4e6936f6225d4b6dd99e (diff)
pinctrl: single: Drop pointless macro
This is left over from initial experiments with more properties. It's only used in one place, so let's just get rid of it to make the code more readable. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/pinctrl-single.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index d125f3f502be..7cc9b7dc8656 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1472,15 +1472,6 @@ static void pcs_free_resources(struct pcs_device *pcs)
pcs_free_pingroups(pcs);
}
-#define PCS_GET_PROP_U32(name, reg, err) \
- do { \
- ret = of_property_read_u32(np, name, reg); \
- if (ret) { \
- dev_err(pcs->dev, err); \
- return ret; \
- } \
- } while (0);
-
static const struct of_device_id pcs_of_match[];
static int pcs_add_gpio_func(struct device_node *node, struct pcs_device *pcs)
@@ -1825,8 +1816,13 @@ static int pcs_probe(struct platform_device *pdev)
pcs->flags = soc->flags;
memcpy(&pcs->socdata, soc, sizeof(*soc));
- PCS_GET_PROP_U32("pinctrl-single,register-width", &pcs->width,
- "register width not specified\n");
+ ret = of_property_read_u32(np, "pinctrl-single,register-width",
+ &pcs->width);
+ if (ret) {
+ dev_err(pcs->dev, "register width not specified\n");
+
+ return ret;
+ }
ret = of_property_read_u32(np, "pinctrl-single,function-mask",
&pcs->fmask);