]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/i2c/busses/i2c-st.c
Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm...
[karo-tx-linux.git] / drivers / i2c / busses / i2c-st.c
index 25020ec777c9783bf5c62853051707bace5c4483..6ee77159ac57a38a95664fa3a3b84089e25b9c3b 100644 (file)
@@ -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)