Skip to content

Commit 673a674

Browse files
ukleinekgregkh
authored andcommitted
Bluetooth: hci_aml: 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/42ae20ba70ff6fbbbd9b846ac9acd0f7d58451b0.1765526117.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6d71c62 commit 673a674

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/bluetooth/hci_aml.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -677,13 +677,6 @@ static const struct hci_uart_proto aml_hci_proto = {
677677
.dequeue = aml_dequeue,
678678
};
679679

680-
static void aml_device_driver_shutdown(struct device *dev)
681-
{
682-
struct aml_serdev *amldev = dev_get_drvdata(dev);
683-
684-
aml_power_off(amldev);
685-
}
686-
687680
static int aml_serdev_probe(struct serdev_device *serdev)
688681
{
689682
struct aml_serdev *amldev;
@@ -714,6 +707,13 @@ static void aml_serdev_remove(struct serdev_device *serdev)
714707
hci_uart_unregister_device(&amldev->serdev_hu);
715708
}
716709

710+
static void aml_serdev_shutdown(struct serdev_device *serdev)
711+
{
712+
struct aml_serdev *amldev = serdev_device_get_drvdata(serdev);
713+
714+
aml_power_off(amldev);
715+
}
716+
717717
static const struct aml_device_data data_w155s2 = {
718718
.iccm_offset = 256 * 1024,
719719
};
@@ -732,10 +732,10 @@ MODULE_DEVICE_TABLE(of, aml_bluetooth_of_match);
732732
static struct serdev_device_driver aml_serdev_driver = {
733733
.probe = aml_serdev_probe,
734734
.remove = aml_serdev_remove,
735+
.shutdown = aml_serdev_shutdown,
735736
.driver = {
736737
.name = "hci_uart_aml",
737738
.of_match_table = aml_bluetooth_of_match,
738-
.shutdown = aml_device_driver_shutdown,
739739
},
740740
};
741741

0 commit comments

Comments
 (0)