File tree 1 file changed +4
-11
lines changed 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,6 @@ static const struct device_type bt_link = {
21
21
.release = bt_link_release ,
22
22
};
23
23
24
- /*
25
- * The rfcomm tty device will possibly retain even when conn
26
- * is down, and sysfs doesn't support move zombie device,
27
- * so we should move the device before conn device is destroyed.
28
- */
29
- static int __match_tty (struct device * dev , void * data )
30
- {
31
- return !strncmp (dev_name (dev ), "rfcomm" , 6 );
32
- }
33
-
34
24
void hci_conn_init_sysfs (struct hci_conn * conn )
35
25
{
36
26
struct hci_dev * hdev = conn -> hdev ;
@@ -73,10 +63,13 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
73
63
return ;
74
64
}
75
65
66
+ /* If there are devices using the connection as parent reset it to NULL
67
+ * before unregistering the device.
68
+ */
76
69
while (1 ) {
77
70
struct device * dev ;
78
71
79
- dev = device_find_child (& conn -> dev , NULL , __match_tty );
72
+ dev = device_find_any_child (& conn -> dev );
80
73
if (!dev )
81
74
break ;
82
75
device_move (dev , NULL , DPM_ORDER_DEV_LAST );
You can’t perform that action at this time.
0 commit comments