]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/surface: Migrate to serdev specific shutdown function
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Fri, 12 Dec 2025 08:09:09 +0000 (09:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Dec 2025 14:08:19 +0000 (15:08 +0100)
The motivation is stop using the callback .shutdown in
qca_serdev_driver.driver to make it possible to drop that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/9682d206a1f375cd98e7dbfce4f1a83b4b345178.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/surface/aggregator/core.c

index c7e05f7bc1999fa3afd9d79300234d629b0cdc5d..82e531023911e364fd649ad7c4c516b052287a84 100644 (file)
@@ -380,9 +380,9 @@ static int ssam_serdev_setup(struct acpi_device *ssh, struct serdev_device *serd
 
 /* -- Power management. ----------------------------------------------------- */
 
-static void ssam_serial_hub_shutdown(struct device *dev)
+static void ssam_serial_hub_shutdown(struct serdev_device *serdev)
 {
-       struct ssam_controller *c = dev_get_drvdata(dev);
+       struct ssam_controller *c = dev_get_drvdata(&serdev->dev);
        int status;
 
        /*
@@ -834,12 +834,12 @@ MODULE_DEVICE_TABLE(of, ssam_serial_hub_of_match);
 static struct serdev_device_driver ssam_serial_hub = {
        .probe = ssam_serial_hub_probe,
        .remove = ssam_serial_hub_remove,
+       .shutdown = ssam_serial_hub_shutdown,
        .driver = {
                .name = "surface_serial_hub",
                .acpi_match_table = ACPI_PTR(ssam_serial_hub_acpi_match),
                .of_match_table = of_match_ptr(ssam_serial_hub_of_match),
                .pm = &ssam_serial_hub_pm_ops,
-               .shutdown = ssam_serial_hub_shutdown,
                .probe_type = PROBE_PREFER_ASYNCHRONOUS,
        },
 };