Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298386
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/10] i2c: st: use to_platform_device() |
| Date | 2015-12-27 14:20 +0100 |
| Message-ID | <qKjoT-7uf-43@gated-at.bofh.it> (permalink) |
| References | <qKjoR-7uf-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/i2c/busses/i2c-st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 25020ec..6ee7715 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -708,8 +708,7 @@ static int st_i2c_xfer(struct i2c_adapter *i2c_adap,
#ifdef CONFIG_PM_SLEEP
static int st_i2c_suspend(struct device *dev)
{
- struct platform_device *pdev =
- container_of(dev, struct platform_device, dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct st_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
if (i2c_dev->busy)
--
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 — Previous 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