diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-27 21:15:42 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-01-03 19:54:31 +0100 |
commit | 66e784130a48653fcc58ebd08b54ece4fbd86bbc (patch) | |
tree | 0fdb65417df427d15d000096f305132110f384ff /drivers/i2c | |
parent | 238c44a70c0637765709c78eeaddb2a3d3674b88 (diff) | |
download | linux-stable-66e784130a48653fcc58ebd08b54ece4fbd86bbc.tar.gz linux-stable-66e784130a48653fcc58ebd08b54ece4fbd86bbc.tar.bz2 linux-stable-66e784130a48653fcc58ebd08b54ece4fbd86bbc.zip |
i2c: st: use to_platform_device()
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-st.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c index ea72dca32fdf..2c3ad8eea1d5 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) |