Merge tag 'sh-pfc-for-v5.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel
pinctrl: sh-pfc: Updates for v5.4 - Add missing of_node_put() calls on RZ/N1, - Small cleanups.
This commit is contained in:
@@ -1359,7 +1359,6 @@ static int rza1_pinctrl_register(struct rza1_pinctrl *rza1_pctl)
|
|||||||
static int rza1_pinctrl_probe(struct platform_device *pdev)
|
static int rza1_pinctrl_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct rza1_pinctrl *rza1_pctl;
|
struct rza1_pinctrl *rza1_pctl;
|
||||||
struct resource *res;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
rza1_pctl = devm_kzalloc(&pdev->dev, sizeof(*rza1_pctl), GFP_KERNEL);
|
rza1_pctl = devm_kzalloc(&pdev->dev, sizeof(*rza1_pctl), GFP_KERNEL);
|
||||||
@@ -1368,8 +1367,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
rza1_pctl->dev = &pdev->dev;
|
rza1_pctl->dev = &pdev->dev;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
rza1_pctl->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
rza1_pctl->base = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(rza1_pctl->base))
|
if (IS_ERR(rza1_pctl->base))
|
||||||
return PTR_ERR(rza1_pctl->base);
|
return PTR_ERR(rza1_pctl->base);
|
||||||
|
|
||||||
|
@@ -412,8 +412,10 @@ static int rzn1_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||||||
|
|
||||||
for_each_child_of_node(np, child) {
|
for_each_child_of_node(np, child) {
|
||||||
ret = rzn1_dt_node_to_map_one(pctldev, child, map, num_maps);
|
ret = rzn1_dt_node_to_map_one(pctldev, child, map, num_maps);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
of_node_put(child);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -792,8 +794,10 @@ static int rzn1_pinctrl_parse_functions(struct device_node *np,
|
|||||||
grp = &ipctl->groups[ipctl->ngroups];
|
grp = &ipctl->groups[ipctl->ngroups];
|
||||||
grp->func = func->name;
|
grp->func = func->name;
|
||||||
ret = rzn1_pinctrl_parse_groups(child, grp, ipctl);
|
ret = rzn1_pinctrl_parse_groups(child, grp, ipctl);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
of_node_put(child);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
ipctl->ngroups++;
|
ipctl->ngroups++;
|
||||||
}
|
}
|
||||||
@@ -838,8 +842,10 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev,
|
|||||||
|
|
||||||
for_each_child_of_node(np, child) {
|
for_each_child_of_node(np, child) {
|
||||||
ret = rzn1_pinctrl_parse_functions(child, ipctl, i++);
|
ret = rzn1_pinctrl_parse_functions(child, ipctl, i++);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
of_node_put(child);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -255,18 +255,13 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
|
|||||||
#ifdef CONFIG_PINCTRL_SH_FUNC_GPIO
|
#ifdef CONFIG_PINCTRL_SH_FUNC_GPIO
|
||||||
static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
|
static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
|
||||||
{
|
{
|
||||||
static bool __print_once;
|
|
||||||
struct sh_pfc *pfc = gpio_to_pfc(gc);
|
struct sh_pfc *pfc = gpio_to_pfc(gc);
|
||||||
unsigned int mark = pfc->info->func_gpios[offset].enum_id;
|
unsigned int mark = pfc->info->func_gpios[offset].enum_id;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!__print_once) {
|
dev_notice_once(pfc->dev,
|
||||||
dev_notice(pfc->dev,
|
"Use of GPIO API for function requests is deprecated, convert to pinctrl\n");
|
||||||
"Use of GPIO API for function requests is deprecated."
|
|
||||||
" Convert to pinctrl\n");
|
|
||||||
__print_once = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mark == 0)
|
if (mark == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Reference in New Issue
Block a user