From: 함명주 <myungjoo.ham@samsung.com>
To: Axel Lin <axel.lin@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: 박경민 <kyungmin.park@samsung.com>, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH] devfreq: exynos4_bus: Use dev_get_drvdata at appropriate places
Date: Mon, 16 Jan 2012 00:54:25 +0000 (GMT) [thread overview]
Message-ID: <11334034.8991326675264300.JavaMail.weblogic@epml24> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 4951 bytes --]
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Looks good. I'll apply this one.
> ---
> drivers/devfreq/exynos4_bus.c | 16 ++++------------
> 1 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> index cd563da..0b67537 100644
> --- a/drivers/devfreq/exynos4_bus.c
> +++ b/drivers/devfreq/exynos4_bus.c
> @@ -622,9 +622,7 @@ static int exynos4_bus_setvolt(struct busfreq_data *data, struct opp *opp,
> static int exynos4_bus_target(struct device *dev, unsigned long *_freq)
> {
> int err = 0;
> - struct platform_device *pdev = container_of(dev, struct platform_device,
> - dev);
> - struct busfreq_data *data = platform_get_drvdata(pdev);
> + struct busfreq_data *data = dev_get_drvdata(dev);
> struct opp *opp = devfreq_recommended_opp(dev, _freq);
> unsigned long old_freq = opp_get_freq(data->curr_opp);
> unsigned long freq = opp_get_freq(opp);
> @@ -689,9 +687,7 @@ static int exynos4_get_busier_dmc(struct busfreq_data *data)
> static int exynos4_bus_get_dev_status(struct device *dev,
> struct devfreq_dev_status *stat)
> {
> - struct platform_device *pdev = container_of(dev, struct platform_device,
> - dev);
> - struct busfreq_data *data = platform_get_drvdata(pdev);
> + struct busfreq_data *data = dev_get_drvdata(dev);
> int busier_dmc;
> int cycles_x2 = 2; /* 2 x cycles */
> void __iomem *addr;
> @@ -739,9 +735,7 @@ static int exynos4_bus_get_dev_status(struct device *dev,
>
> static void exynos4_bus_exit(struct device *dev)
> {
> - struct platform_device *pdev = container_of(dev, struct platform_device,
> - dev);
> - struct busfreq_data *data = platform_get_drvdata(pdev);
> + struct busfreq_data *data = dev_get_drvdata(dev);
>
> devfreq_unregister_opp_notifier(dev, data->devfreq);
> }
> @@ -1087,9 +1081,7 @@ static __devexit int exynos4_busfreq_remove(struct platform_device *pdev)
>
> static int exynos4_busfreq_resume(struct device *dev)
> {
> - struct platform_device *pdev = container_of(dev, struct platform_device,
> - dev);
> - struct busfreq_data *data = platform_get_drvdata(pdev);
> + struct busfreq_data *data = dev_get_drvdata(dev);
>
> busfreq_mon_reset(data);
> return 0;
> --
> 1.7.5.4
>
>
------- Original Message -------
Sender : Axel Lin<axel.lin@gmail.com>
Date : 2012-01-14 17:56 (GMT+09:00)
Title : [PATCH] devfreq: exynos4_bus: Use dev_get_drvdata at appropriate places
Signed-off-by: Axel Lin
---
drivers/devfreq/exynos4_bus.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index cd563da..0b67537 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -622,9 +622,7 @@ static int exynos4_bus_setvolt(struct busfreq_data *data, struct opp *opp,
static int exynos4_bus_target(struct device *dev, unsigned long *_freq)
{
int err = 0;
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
- struct busfreq_data *data = platform_get_drvdata(pdev);
+ struct busfreq_data *data = dev_get_drvdata(dev);
struct opp *opp = devfreq_recommended_opp(dev, _freq);
unsigned long old_freq = opp_get_freq(data->curr_opp);
unsigned long freq = opp_get_freq(opp);
@@ -689,9 +687,7 @@ static int exynos4_get_busier_dmc(struct busfreq_data *data)
static int exynos4_bus_get_dev_status(struct device *dev,
struct devfreq_dev_status *stat)
{
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
- struct busfreq_data *data = platform_get_drvdata(pdev);
+ struct busfreq_data *data = dev_get_drvdata(dev);
int busier_dmc;
int cycles_x2 = 2; /* 2 x cycles */
void __iomem *addr;
@@ -739,9 +735,7 @@ static int exynos4_bus_get_dev_status(struct device *dev,
static void exynos4_bus_exit(struct device *dev)
{
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
- struct busfreq_data *data = platform_get_drvdata(pdev);
+ struct busfreq_data *data = dev_get_drvdata(dev);
devfreq_unregister_opp_notifier(dev, data->devfreq);
}
@@ -1087,9 +1081,7 @@ static __devexit int exynos4_busfreq_remove(struct platform_device *pdev)
static int exynos4_busfreq_resume(struct device *dev)
{
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
- struct busfreq_data *data = platform_get_drvdata(pdev);
+ struct busfreq_data *data = dev_get_drvdata(dev);
busfreq_mon_reset(data);
return 0;
--
1.7.5.4
MyungJoo Ham (ÇÔ¸íÁÖ)
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: +82-10-6714-2858 / office: +82-31-279-8033ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next reply other threads:[~2012-01-16 0:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 0:54 함명주 [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-14 8:56 [PATCH] devfreq: exynos4_bus: Use dev_get_drvdata at appropriate places Axel Lin
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=11334034.8991326675264300.JavaMail.weblogic@epml24 \
--to=myungjoo.ham@samsung.com \
--cc=axel.lin@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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