Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc2a9000 authored by Sebastian Hesselbarth's avatar Sebastian Hesselbarth
Browse files

pinctrl: mvebu: remove obsolete per-control name buffer allocation



With the introduction of a global name buffer, we can now remove
the allocation and preparation of per-control name buffers.

Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 8d898fd5
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -636,7 +636,6 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
	pctl->desc.npins = 0;
	pctl->desc.npins = 0;
	for (n = 0; n < soc->ncontrols; n++) {
	for (n = 0; n < soc->ncontrols; n++) {
		struct mvebu_mpp_ctrl *ctrl = &soc->controls[n];
		struct mvebu_mpp_ctrl *ctrl = &soc->controls[n];
		char *names;


		pctl->desc.npins += ctrl->npins;
		pctl->desc.npins += ctrl->npins;
		/* initial control pins */
		/* initial control pins */
@@ -654,14 +653,6 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
		}
		}


		/* generic mvebu register control */
		/* generic mvebu register control */
		names = devm_kzalloc(&pdev->dev, ctrl->npins * 8, GFP_KERNEL);
		if (!names) {
			dev_err(&pdev->dev, "failed to alloc mpp names\n");
			return -ENOMEM;
		}
		for (k = 0; k < ctrl->npins; k++)
			sprintf(names + 8*k, "mpp%d", ctrl->pid+k);
		ctrl->name = names;
		pctl->num_groups += ctrl->npins;
		pctl->num_groups += ctrl->npins;
		noname += ctrl->npins;
		noname += ctrl->npins;
	}
	}