]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/iio/light/apds9960.c
Merge tag 'for-f2fs-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[karo-tx-linux.git] / drivers / iio / light / apds9960.c
index a4304edc3e0fac6b161daa1342c6b99c967b4225..518a47e9377b031130d3e562e818c3a463a1c18f 100644 (file)
@@ -343,7 +343,7 @@ static struct attribute *apds9960_attributes[] = {
        NULL,
 };
 
-static struct attribute_group apds9960_attribute_group = {
+static const struct attribute_group apds9960_attribute_group = {
        .attrs = apds9960_attributes,
 };
 
@@ -1112,6 +1112,8 @@ static int apds9960_runtime_resume(struct device *dev)
 #endif
 
 static const struct dev_pm_ops apds9960_pm_ops = {
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
        SET_RUNTIME_PM_OPS(apds9960_runtime_suspend,
                           apds9960_runtime_resume, NULL)
 };
@@ -1122,9 +1124,16 @@ static const struct i2c_device_id apds9960_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, apds9960_id);
 
+static const struct of_device_id apds9960_of_match[] = {
+       { .compatible = "avago,apds9960" },
+       { }
+};
+MODULE_DEVICE_TABLE(of, apds9960_of_match);
+
 static struct i2c_driver apds9960_driver = {
        .driver = {
                .name   = APDS9960_DRV_NAME,
+               .of_match_table = apds9960_of_match,
                .pm     = &apds9960_pm_ops,
        },
        .probe          = apds9960_probe,