Skip to content

Commit 12a6a57

Browse files
ukleinekgregkh
authored andcommitted
Bluetooth: hci_qca: Migrate to serdev specific shutdown function
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>
1 parent 673a674 commit 12a6a57

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/bluetooth/hci_qca.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,11 +2530,10 @@ static void qca_serdev_remove(struct serdev_device *serdev)
25302530
hci_uart_unregister_device(&qcadev->serdev_hu);
25312531
}
25322532

2533-
static void qca_serdev_shutdown(struct device *dev)
2533+
static void qca_serdev_shutdown(struct serdev_device *serdev)
25342534
{
25352535
int ret;
25362536
int timeout = msecs_to_jiffies(CMD_TRANS_TIMEOUT_MS);
2537-
struct serdev_device *serdev = to_serdev_device(dev);
25382537
struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
25392538
struct hci_uart *hu = &qcadev->serdev_hu;
25402539
struct hci_dev *hdev = hu->hdev;
@@ -2756,11 +2755,11 @@ static void hciqca_coredump(struct device *dev)
27562755
static struct serdev_device_driver qca_serdev_driver = {
27572756
.probe = qca_serdev_probe,
27582757
.remove = qca_serdev_remove,
2758+
.shutdown = qca_serdev_shutdown,
27592759
.driver = {
27602760
.name = "hci_uart_qca",
27612761
.of_match_table = of_match_ptr(qca_bluetooth_of_match),
27622762
.acpi_match_table = ACPI_PTR(qca_bluetooth_acpi_match),
2763-
.shutdown = qca_serdev_shutdown,
27642763
.pm = &qca_pm_ops,
27652764
#ifdef CONFIG_DEV_COREDUMP
27662765
.coredump = hciqca_coredump,

0 commit comments

Comments
 (0)