lkml.org 
[lkml]   [2016]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 33/50] pinctrl: adi2: Use devm_pinctrl_register() for pinctrl registration
    Date
    Use devm_pinctrl_register() for pin control registration and remove
    the need of .remove callback.

    Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
    ---
    drivers/pinctrl/pinctrl-adi2.c | 13 ++-----------
    1 file changed, 2 insertions(+), 11 deletions(-)

    diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c
    index ecb57635..54569a7 100644
    --- a/drivers/pinctrl/pinctrl-adi2.c
    +++ b/drivers/pinctrl/pinctrl-adi2.c
    @@ -1058,7 +1058,8 @@ static int adi_pinctrl_probe(struct platform_device *pdev)
    adi_pinmux_desc.npins = pinctrl->soc->npins;

    /* Now register the pin controller and all pins it handles */
    - pinctrl->pctl = pinctrl_register(&adi_pinmux_desc, &pdev->dev, pinctrl);
    + pinctrl->pctl = devm_pinctrl_register(&pdev->dev, &adi_pinmux_desc,
    + pinctrl);
    if (IS_ERR(pinctrl->pctl)) {
    dev_err(&pdev->dev, "could not register pinctrl ADI2 driver\n");
    return PTR_ERR(pinctrl->pctl);
    @@ -1069,18 +1070,8 @@ static int adi_pinctrl_probe(struct platform_device *pdev)
    return 0;
    }

    -static int adi_pinctrl_remove(struct platform_device *pdev)
    -{
    - struct adi_pinctrl *pinctrl = platform_get_drvdata(pdev);
    -
    - pinctrl_unregister(pinctrl->pctl);
    -
    - return 0;
    -}
    -
    static struct platform_driver adi_pinctrl_driver = {
    .probe = adi_pinctrl_probe,
    - .remove = adi_pinctrl_remove,
    .driver = {
    .name = DRIVER_NAME,
    },
    --
    2.1.4
    \
     
     \ /
      Last update: 2016-02-24 15:21    [W:2.936 / U:0.792 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site