]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/misc/bh1770glc.c
Merge branch 'for-4.6/core' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / drivers / misc / bh1770glc.c
index 753d7ecdadaa78a27df6c47c54a0bd0265192ac4..845466e45b9593ece7702c574fb5a42fc6032bd4 100644 (file)
@@ -1323,7 +1323,7 @@ static int bh1770_remove(struct i2c_client *client)
 #ifdef CONFIG_PM_SLEEP
 static int bh1770_suspend(struct device *dev)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+       struct i2c_client *client = to_i2c_client(dev);
        struct bh1770_chip *chip = i2c_get_clientdata(client);
 
        bh1770_chip_off(chip);
@@ -1333,7 +1333,7 @@ static int bh1770_suspend(struct device *dev)
 
 static int bh1770_resume(struct device *dev)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+       struct i2c_client *client = to_i2c_client(dev);
        struct bh1770_chip *chip = i2c_get_clientdata(client);
        int ret = 0;
 
@@ -1361,7 +1361,7 @@ static int bh1770_resume(struct device *dev)
 #ifdef CONFIG_PM
 static int bh1770_runtime_suspend(struct device *dev)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+       struct i2c_client *client = to_i2c_client(dev);
        struct bh1770_chip *chip = i2c_get_clientdata(client);
 
        bh1770_chip_off(chip);
@@ -1371,7 +1371,7 @@ static int bh1770_runtime_suspend(struct device *dev)
 
 static int bh1770_runtime_resume(struct device *dev)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+       struct i2c_client *client = to_i2c_client(dev);
        struct bh1770_chip *chip = i2c_get_clientdata(client);
 
        bh1770_chip_on(chip);