linux-next: manual merge of the bluetooth tree with the net tree
Subsystems (3)
Mark Brown
maintainerHi all,
Today's linux-next merge of the bluetooth tree got a conflict in:
drivers/bluetooth/hci_qca.c
between commit:
5c4e9a8b18457 ("Bluetooth: hci_qca: Cleanup on all setup failures")
from the net tree and commits:
facc2350b0df6 ("Bluetooth: hci_qca: Cleanup on all setup failures") 88b5c728a785c ("Bluetooth: hci_qca: Fix confusing shutdown() and power_off() naming")
from the bluetooth tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/bluetooth/hci_qca.c +0 -0
@@@ -236,8 -236,7 +236,7 @@@ struct qca_serdevstatic int qca_regulator_enable (struct qca_serdev *qcadev);static void qca_regulator_disable (struct qca_serdev *qcadev); -static void qca_power_shutdown (struct hci_uart *hu); -static int qca_power_off (struct hci_dev *hdev); +static void qca_power_off (struct hci_uart *hu);static void qca_controller_memdump (struct work_struct *work);static void qca_dmp_hdr (struct hci_dev *hdev,struct sk_buff *skb);if (!hci_uart_has_flow_control (hu))return -EOPNOTSUPP ; - qca =kzalloc (sizeof (*qca),GFP_KERNEL ); + qca =kzalloc_obj (*qca);if (!qca)return -ENOMEM ;BT_DBG ("hu %p qca close" , hu); +/* BT core skips qca_hci_shutdown() which calls qca_power_off() on rmmod */ +if (!test_bit (QCA_BT_OFF , &qca->flags)) +qca_power_off (hu); +serial_clock_vote (HCI_IBS_VOTE_STATS_UPDATE , hu);skb_queue_purge (&qca->tx_wait_q); }if (!qca_memdump) { - qca_memdump =kzalloc (sizeof (*qca_memdump),GFP_ATOMIC ); + qca_memdump =kzalloc_obj (*qca_memdump,GFP_ATOMIC );if (!qca_memdump) {mutex_unlock (&qca->hci_memdump_lock);return ;return 0 ;switch (soc_type) { +case QCA_QCA6390 :case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : -case QCA_QCA6390 : ret =qca_regulator_init (hu);break ; out:if (ret) { -qca_power_shutdown (hu); +qca_power_off (hu);if (retries <MAX_INIT_RETRIES ) {bt_dev_warn (hdev,"Retry BT power ON:%d" , retries); .dequeue = qca_dequeue, }; +static const struct qca_device_data qca_soc_data_qca2066__maybe_unused = { + .soc_type =QCA_QCA2066 , + .num_vregs =0 , + .capabilities =QCA_CAP_WIDEBAND_SPEECH |QCA_CAP_VALID_LE_STATES | +QCA_CAP_HFP_HW_OFFLOAD , + }; + +static const struct qca_device_data qca_soc_data_qca6390__maybe_unused = { + .soc_type =QCA_QCA6390 , + .num_vregs =0 , + }; +static const struct qca_device_data qca_soc_data_wcn3950__maybe_unused = { .soc_type =QCA_WCN3950 , .vregs = (struct qca_vreg []) { .num_vregs =4 , }; -static const struct qca_device_data qca_soc_data_qca2066__maybe_unused = { - .soc_type =QCA_QCA2066 , - .num_vregs =0 , - .capabilities =QCA_CAP_WIDEBAND_SPEECH |QCA_CAP_VALID_LE_STATES | -QCA_CAP_HFP_HW_OFFLOAD , - }; - -static const struct qca_device_data qca_soc_data_qca6390__maybe_unused = { - .soc_type =QCA_QCA6390 , - .num_vregs =0 , - }; -static const struct qca_device_data qca_soc_data_wcn6750__maybe_unused = { .soc_type =QCA_WCN6750 , .vregs = (struct qca_vreg []) {QCA_CAP_HFP_HW_OFFLOAD , }; -static void qca_power_shutdown (struct hci_uart *hu) +static void qca_power_off (struct hci_uart *hu) {struct qca_serdev *qcadev;struct qca_data *qca = hu->priv;qca_regulator_disable (qcadev);if (qcadev->sw_ctrl) { sw_ctrl_state =gpiod_get_value_cansleep (qcadev->sw_ctrl); -bt_dev_dbg (hu->hdev,"SW_CTRL is %d" , sw_ctrl_state); +BT_DBG ("SW_CTRL is %d" , sw_ctrl_state); }break ;set_bit (QCA_BT_OFF , &qca->flags); } -static int qca_power_off (struct hci_dev *hdev) +static int qca_hci_shutdown (struct hci_dev *hdev) {struct hci_uart *hu =hci_get_drvdata (hdev);struct qca_data *qca = hu->priv;usleep_range (8000 ,10000 ); } -qca_power_shutdown (hu); +qca_power_off (hu);return 0 ; } qcadev->btsoc_type =QCA_ROME ;switch (qcadev->btsoc_type) { +case QCA_QCA6390 :case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : -case QCA_QCA6390 : qcadev->bt_power =devm_kzalloc (&serdev->dev,sizeof (struct qca_power ),GFP_KERNEL ); }switch (qcadev->btsoc_type) { +case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : -case QCA_WCN6750 :if (!device_property_present (&serdev->dev,"enable-gpios" )) {/* * Backward compatibility with old DT sources. If the if (power_ctrl_enabled) { hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP); -hdev->shutdown = qca_power_off; +hdev->shutdown = qca_hci_shutdown; } if (data) { case QCA_WCN6855: case QCA_WCN7850: if (power->vregs_on) -qca_power_shutdown(&qcadev->serdev_hu); +qca_power_off(&qcadev->serdev_hu); break; default: break; 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; 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,