drivers: bluetooth: bpa10x: use usb_{get,put}_dev in bpa10x_{probe,disconnect}
PATCH 1/1 drivers: bluetooth: bpa10x: use usb_{get,put}_dev in bpa10x_{probe,disconnect}
Use usb_{get,put}_dev() to update the ref count of udev.
--- drivers/bluetooth/bpa10x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/bluetooth/bpa10x.c +3 -1
@@ -375,7 +375,7 @@ static int bpa10x_probe(struct usb_interface *intf,if (!data)return -ENOMEM ; - data->udev =interface_to_usbdev (intf); + data->udev =usb_get_dev (interface_to_usbdev (intf));init_usb_anchor (&data->tx_anchor);init_usb_anchor (&data->rx_anchor);
@@ -422,6 +422,8 @@ static void bpa10x_disconnect(struct usb_interface *intf)usb_set_intfdata (intf,NULL ); +usb_put_dev (data->udev); +hci_unregister_dev (data->hdev);hci_free_dev (data->hdev);
Signature · 1 line
2.43.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=957507
---Test result---
Test Summary:
CheckPatch PENDING 0.26 seconds GitLint PENDING 0.26 seconds SubjectPrefix FAIL 0.34 seconds BuildKernel PASS 24.64 seconds CheckAllWarning PASS 27.38 seconds CheckSparse PASS 30.84 seconds BuildKernel32 PASS 25.42 seconds TestRunnerSetup PASS 463.54 seconds TestRunner_l2cap-tester PASS 21.21 seconds TestRunner_iso-tester PASS 31.57 seconds TestRunner_bnep-tester PASS 4.86 seconds TestRunner_mgmt-tester FAIL 121.25 seconds TestRunner_rfcomm-tester PASS 7.80 seconds TestRunner_sco-tester PASS 12.69 seconds TestRunner_ioctl-tester PASS 8.57 seconds TestRunner_mesh-tester PASS 6.02 seconds TestRunner_smp-tester PASS 7.22 seconds TestRunner_userchan-tester PASS 5.01 seconds IncrementalBuild PENDING 0.43 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 490, Passed: 484 (98.8%), Failed: 2, Not Run: 4
Failed Test Cases
LL Privacy - Add Device 3 (AL is full) Failed 0.190 seconds LL Privacy - Start Discovery 1 (Disable RL) Failed 0.175 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth
Dear Salah,
Thank you for your patch.
Am 27.04.25 um 18:23 schrieb Salah Triki:
Quoted 1 line
Use usb_{get,put}_dev() to update the ref count of udev.
Could you please add why that is better?
Quoted 19 lines
Signed-off-by Salah Triki <[email protected]>--- drivers/bluetooth/bpa10x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/bluetooth/bpa10x.c +1
-1@@ -375,7 +375,7 @@ static int bpa10x_probe(struct usb_interface *intf,if (!data)return -ENOMEM ; - data->udev =interface_to_usbdev (intf); + data->udev =usb_get_dev (interface_to_usbdev (intf));init_usb_anchor (&data->tx_anchor);init_usb_anchor (&data->rx_anchor);
drivers/bluetooth/bpa10x.c static void bpa10x_disconnect(struct usb_interface *intf) · line 429
Quoted 8 lines
drivers/bluetooth/bpa10x.c +2
-0@@ -422,6 +422,8 @@ static void bpa10x_disconnect(struct usb_interface *intf)usb_set_intfdata (intf,NULL ); +usb_put_dev (data->udev); +hci_unregister_dev (data->hdev);hci_free_dev (data->hdev);
Kind regards,
Paul