]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: hci_qca: Migrate to serdev specific shutdown function
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Fri, 12 Dec 2025 08:09:08 +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/261a3384e25c4837d4efee87958805f15d7d4e3c.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/hci_qca.c

index 888176b0faa906ee3f078e75093c037e39bbd89b..6d54f747fde4e4cd87668b8db47def4a8090f462 100644 (file)
@@ -2530,11 +2530,10 @@ static void qca_serdev_remove(struct serdev_device *serdev)
        hci_uart_unregister_device(&qcadev->serdev_hu);
 }
 
-static void qca_serdev_shutdown(struct device *dev)
+static void qca_serdev_shutdown(struct serdev_device *serdev)
 {
        int ret;
        int timeout = msecs_to_jiffies(CMD_TRANS_TIMEOUT_MS);
-       struct serdev_device *serdev = to_serdev_device(dev);
        struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
        struct hci_uart *hu = &qcadev->serdev_hu;
        struct hci_dev *hdev = hu->hdev;
@@ -2756,11 +2755,11 @@ static void hciqca_coredump(struct device *dev)
 static struct serdev_device_driver qca_serdev_driver = {
        .probe = qca_serdev_probe,
        .remove = qca_serdev_remove,
+       .shutdown = qca_serdev_shutdown,
        .driver = {
                .name = "hci_uart_qca",
                .of_match_table = of_match_ptr(qca_bluetooth_of_match),
                .acpi_match_table = ACPI_PTR(qca_bluetooth_acpi_match),
-               .shutdown = qca_serdev_shutdown,
                .pm = &qca_pm_ops,
 #ifdef CONFIG_DEV_COREDUMP
                .coredump = hciqca_coredump,