]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/misc/apds990x.c
Merge branch 'for-4.6/core' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / drivers / misc / apds990x.c
index a3e789b85cc82e441530981736ba227b0226bcf7..dfb72ecfa6046117a243703374d78fe49c3e1466 100644 (file)
@@ -1215,7 +1215,7 @@ static int apds990x_remove(struct i2c_client *client)
 #ifdef CONFIG_PM_SLEEP
 static int apds990x_suspend(struct device *dev)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+       struct i2c_client *client = to_i2c_client(dev);
        struct apds990x_chip *chip = i2c_get_clientdata(client);
 
        apds990x_chip_off(chip);
@@ -1224,7 +1224,7 @@ static int apds990x_suspend(struct device *dev)
 
 static int apds990x_resume(struct device *dev)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+       struct i2c_client *client = to_i2c_client(dev);
        struct apds990x_chip *chip = i2c_get_clientdata(client);
 
        /*
@@ -1240,7 +1240,7 @@ static int apds990x_resume(struct device *dev)
 #ifdef CONFIG_PM
 static int apds990x_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 apds990x_chip *chip = i2c_get_clientdata(client);
 
        apds990x_chip_off(chip);
@@ -1249,7 +1249,7 @@ static int apds990x_runtime_suspend(struct device *dev)
 
 static int apds990x_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 apds990x_chip *chip = i2c_get_clientdata(client);
 
        apds990x_chip_on(chip);