]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pinctrl: mvebu: remove obsolete per-control name buffer allocation
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Thu, 30 Jan 2014 22:47:11 +0000 (23:47 +0100)
committerSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tue, 25 Feb 2014 17:34:41 +0000 (18:34 +0100)
With the introduction of a global name buffer, we can now remove
the allocation and preparation of per-control name buffers.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
drivers/pinctrl/mvebu/pinctrl-mvebu.c

index d47650fc511972320314aefdd18d7f285b01452a..c0e27e4f8953282c9f5a8e29e1da6c8951595cd7 100644 (file)
@@ -636,7 +636,6 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
        pctl->desc.npins = 0;
        for (n = 0; n < soc->ncontrols; n++) {
                struct mvebu_mpp_ctrl *ctrl = &soc->controls[n];
-               char *names;
 
                pctl->desc.npins += ctrl->npins;
                /* initial control pins */
@@ -654,14 +653,6 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
                }
 
                /* 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;
                noname += ctrl->npins;
        }