platform/chrome: cros_hps_i2c: Replace deprecated UNIVERSAL_DEV_PM_OPS()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 3 Apr 2024 10:55:02 +0000 (13:55 +0300)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 24 Apr 2024 08:45:59 +0000 (16:45 +0800)
The UNIVERSAL_DEV_PM_OPS() macro is deprecated. Replace it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240403105502.558351-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_hps_i2c.c

index b31313080332430280a3c6f7ae3921626d1e7dab..dd14957ec39fc4e4620edb45db6d6125ba3c1995 100644 (file)
@@ -126,7 +126,7 @@ static int hps_resume(struct device *dev)
        hps_set_power(hps, true);
        return 0;
 }
-static UNIVERSAL_DEV_PM_OPS(hps_pm_ops, hps_suspend, hps_resume, NULL);
+static DEFINE_RUNTIME_DEV_PM_OPS(hps_pm_ops, hps_suspend, hps_resume, NULL);
 
 static const struct i2c_device_id hps_i2c_id[] = {
        { "cros-hps", 0 },
@@ -148,7 +148,7 @@ static struct i2c_driver hps_i2c_driver = {
        .id_table = hps_i2c_id,
        .driver = {
                .name = "cros-hps",
-               .pm = &hps_pm_ops,
+               .pm = pm_ptr(&hps_pm_ops),
                .acpi_match_table = ACPI_PTR(hps_acpi_id),
        },
 };