public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: use platform_{get,set}_drvdata()
Date: Thu, 30 May 2013 18:20:14 -0700	[thread overview]
Message-ID: <20130531012014.21525.39312@quantum> (raw)
In-Reply-To: <000401ce581b$a9224600$fb66d200$@samsung.com>

Quoting Jingoo Han (2013-05-23 18:11:46)
> Use the wrapper functions for getting and setting the driver data using
> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
> so we can directly pass a struct platform_device.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Taken into clk-next.

Thanks for the patch,
Mike

> ---
>  drivers/clk/clk-twl6040.c |    4 ++--
>  drivers/clk/clk-wm831x.c  |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c
> index 3af729b..1ada79a 100644
> --- a/drivers/clk/clk-twl6040.c
> +++ b/drivers/clk/clk-twl6040.c
> @@ -95,14 +95,14 @@ static int twl6040_clk_probe(struct platform_device *pdev)
>         if (IS_ERR(clkdata->clk))
>                 return PTR_ERR(clkdata->clk);
>  
> -       dev_set_drvdata(&pdev->dev, clkdata);
> +       platform_set_drvdata(pdev, clkdata);
>  
>         return 0;
>  }
>  
>  static int twl6040_clk_remove(struct platform_device *pdev)
>  {
> -       struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev);
> +       struct twl6040_clk *clkdata = platform_get_drvdata(pdev);
>  
>         clk_unregister(clkdata->clk);
>  
> diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c
> index 16ed068..0d3c04e 100644
> --- a/drivers/clk/clk-wm831x.c
> +++ b/drivers/clk/clk-wm831x.c
> @@ -384,7 +384,7 @@ static int wm831x_clk_probe(struct platform_device *pdev)
>         if (IS_ERR(clkdata->clkout))
>                 return PTR_ERR(clkdata->clkout);
>  
> -       dev_set_drvdata(&pdev->dev, clkdata);
> +       platform_set_drvdata(pdev, clkdata);
>  
>         return 0;
>  }
> -- 
> 1.7.10.4

      parent reply	other threads:[~2013-05-31  1:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24  1:11 [PATCH] clk: use platform_{get,set}_drvdata() Jingoo Han
2013-05-27 11:29 ` Mark Brown
2013-05-31  1:20 ` Mike Turquette [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130531012014.21525.39312@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox