]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: hci_aml: Migrate to serdev specific shutdown function
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Fri, 12 Dec 2025 08:09:07 +0000 (09:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Dec 2025 14:08:19 +0000 (15:08 +0100)
This saves a cast in the driver. 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/42ae20ba70ff6fbbbd9b846ac9acd0f7d58451b0.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/hci_aml.c

index b1f32c5a8a3f419650b29990a684bc1435e0bb08..4981c82d634d529a69d311a65b17acd9b0626c41 100644 (file)
@@ -677,13 +677,6 @@ static const struct hci_uart_proto aml_hci_proto = {
        .dequeue        = aml_dequeue,
 };
 
-static void aml_device_driver_shutdown(struct device *dev)
-{
-       struct aml_serdev *amldev = dev_get_drvdata(dev);
-
-       aml_power_off(amldev);
-}
-
 static int aml_serdev_probe(struct serdev_device *serdev)
 {
        struct aml_serdev *amldev;
@@ -714,6 +707,13 @@ static void aml_serdev_remove(struct serdev_device *serdev)
        hci_uart_unregister_device(&amldev->serdev_hu);
 }
 
+static void aml_serdev_shutdown(struct serdev_device *serdev)
+{
+       struct aml_serdev *amldev = serdev_device_get_drvdata(serdev);
+
+       aml_power_off(amldev);
+}
+
 static const struct aml_device_data data_w155s2 = {
        .iccm_offset = 256 * 1024,
 };
@@ -732,10 +732,10 @@ MODULE_DEVICE_TABLE(of, aml_bluetooth_of_match);
 static struct serdev_device_driver aml_serdev_driver = {
        .probe = aml_serdev_probe,
        .remove = aml_serdev_remove,
+       .shutdown = aml_serdev_shutdown,
        .driver = {
                .name = "hci_uart_aml",
                .of_match_table = aml_bluetooth_of_match,
-               .shutdown = aml_device_driver_shutdown,
        },
 };