* [PATCH 04/10] i2c: st: use to_platform_device()
[not found] <a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com>
@ 2015-12-27 13:15 ` Geliang Tang
2016-01-03 18:55 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
Wolfram Sang
Cc: Geliang Tang, linux-kernel, kernel, linux-arm-kernel, linux-i2c
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 04/10] i2c: st: use to_platform_device()
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: use to_platform_device() Geliang Tang
@ 2016-01-03 18:55 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-01-03 18:55 UTC (permalink / raw)
To: Geliang Tang
Cc: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
linux-arm-kernel, kernel, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
On Sun, Dec 27, 2015 at 09:15:42PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-03 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com>
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: use to_platform_device() Geliang Tang
2016-01-03 18:55 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).