Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298375
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/10] PM / devfreq: exynos: use to_platform_device() |
| Date | 2015-12-27 14:20 +0100 |
| Message-ID | <qKjoR-7uf-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/devfreq/exynos/exynos4_bus.c | 3 +--
drivers/devfreq/exynos/exynos5_bus.c | 9 +++------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/devfreq/exynos/exynos4_bus.c b/drivers/devfreq/exynos/exynos4_bus.c
index da95092..e3124bf 100644
--- a/drivers/devfreq/exynos/exynos4_bus.c
+++ b/drivers/devfreq/exynos/exynos4_bus.c
@@ -566,8 +566,7 @@ static int exynos4_bus_target(struct device *dev, unsigned long *_freq,
u32 flags)
{
int err = 0;
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct busfreq_data *data = platform_get_drvdata(pdev);
struct dev_pm_opp *opp;
unsigned long freq;
diff --git a/drivers/devfreq/exynos/exynos5_bus.c b/drivers/devfreq/exynos/exynos5_bus.c
index 297ea30..81da78e 100644
--- a/drivers/devfreq/exynos/exynos5_bus.c
+++ b/drivers/devfreq/exynos/exynos5_bus.c
@@ -85,8 +85,7 @@ static int exynos5_busfreq_int_target(struct device *dev, unsigned long *_freq,
u32 flags)
{
int err = 0;
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct busfreq_data_int *data = platform_get_drvdata(pdev);
struct dev_pm_opp *opp;
unsigned long old_freq, freq;
@@ -145,8 +144,7 @@ out:
static int exynos5_int_get_dev_status(struct device *dev,
struct devfreq_dev_status *stat)
{
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct busfreq_data_int *data = platform_get_drvdata(pdev);
struct busfreq_ppmu_data *ppmu_data = &data->ppmu_data;
int busier_dmc;
@@ -370,8 +368,7 @@ static int exynos5_busfreq_int_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int exynos5_busfreq_int_resume(struct device *dev)
{
- struct platform_device *pdev = container_of(dev, struct platform_device,
- dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct busfreq_data_int *data = platform_get_drvdata(pdev);
struct busfreq_ppmu_data *ppmu_data = &data->ppmu_data;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 01/10] PM / devfreq: exynos: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
[PATCH 02/10] spi: cadence, zynq: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
Re: [PATCH 02/10] spi: cadence, zynq: use to_platform_device() Moritz Fischer <moritz.fischer@ettus.com> - 2015-12-29 19:10 +0100
[PATCH 1/2] spi: cadence: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-30 16:00 +0100
Re: [PATCH 1/2] spi: cadence: use to_platform_device() Mark Brown <broonie@kernel.org> - 2015-12-30 18:10 +0100
[PATCH 03/10] dmaengine: ppc4xx: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
[PATCH 08/10] staging: fbtft: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
[PATCH 06/10] net: hns: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
Re: [PATCH 06/10] net: hns: use to_platform_device() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-27 14:30 +0100
Re: [PATCH 06/10] net: hns: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-28 03:50 +0100
Re: [PATCH 06/10] net: hns: use to_platform_device() David Miller <davem@davemloft.net> - 2015-12-29 21:50 +0100
[PATCH 07/10] platform/chrome: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
[PATCH 10/10] ARM: plat-samsung: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
Re: [PATCH 10/10] ARM: plat-samsung: use to_platform_device() Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-28 03:50 +0100
[PATCH 05/10] mmc: cb710: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
Re: [PATCH 05/10] mmc: cb710: use to_platform_device() Ulf Hansson <ulf.hansson@linaro.org> - 2015-12-28 14:30 +0100
[PATCH 04/10] i2c: st: use to_platform_device() Geliang Tang <geliangtang@163.com> - 2015-12-27 14:20 +0100
csiph-web