aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_sysfs.c')
-rw-r--r--net/bluetooth/hci_sysfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 3eeeb7a86e75..d4c935692ccf 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -237,9 +237,9 @@ static void bt_release(struct device *dev)
237 kfree(data); 237 kfree(data);
238} 238}
239 239
240static void add_conn(void *data) 240static void add_conn(struct work_struct *work)
241{ 241{
242 struct hci_conn *conn = data; 242 struct hci_conn *conn = container_of(work, struct hci_conn, work);
243 int i; 243 int i;
244 244
245 if (device_register(&conn->dev) < 0) { 245 if (device_register(&conn->dev) < 0) {
@@ -272,14 +272,14 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
272 272
273 dev_set_drvdata(&conn->dev, conn); 273 dev_set_drvdata(&conn->dev, conn);
274 274
275 INIT_WORK(&conn->work, add_conn, (void *) conn); 275 INIT_WORK(&conn->work, add_conn);
276 276
277 schedule_work(&conn->work); 277 schedule_work(&conn->work);
278} 278}
279 279
280static void del_conn(void *data) 280static void del_conn(struct work_struct *work)
281{ 281{
282 struct hci_conn *conn = data; 282 struct hci_conn *conn = container_of(work, struct hci_conn, work);
283 device_del(&conn->dev); 283 device_del(&conn->dev);
284} 284}
285 285
@@ -287,7 +287,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
287{ 287{
288 BT_DBG("conn %p", conn); 288 BT_DBG("conn %p", conn);
289 289
290 INIT_WORK(&conn->work, del_conn, (void *) conn); 290 INIT_WORK(&conn->work, del_conn);
291 291
292 schedule_work(&conn->work); 292 schedule_work(&conn->work);
293} 293}