diff options
Diffstat (limited to 'net/caif/caif_dev.c')
-rw-r--r-- | net/caif/caif_dev.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index e2b86f1f5a4..0b586e9d137 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c | |||
@@ -255,7 +255,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, | |||
255 | pref = CFPHYPREF_HIGH_BW; | 255 | pref = CFPHYPREF_HIGH_BW; |
256 | break; | 256 | break; |
257 | } | 257 | } |
258 | 258 | dev_hold(dev); | |
259 | cfcnfg_add_phy_layer(get_caif_conf(), | 259 | cfcnfg_add_phy_layer(get_caif_conf(), |
260 | phy_type, | 260 | phy_type, |
261 | dev, | 261 | dev, |
@@ -285,6 +285,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, | |||
285 | caifd->layer.up->ctrlcmd(caifd->layer.up, | 285 | caifd->layer.up->ctrlcmd(caifd->layer.up, |
286 | _CAIF_CTRLCMD_PHYIF_DOWN_IND, | 286 | _CAIF_CTRLCMD_PHYIF_DOWN_IND, |
287 | caifd->layer.id); | 287 | caifd->layer.id); |
288 | might_sleep(); | ||
288 | res = wait_event_interruptible_timeout(caifd->event, | 289 | res = wait_event_interruptible_timeout(caifd->event, |
289 | atomic_read(&caifd->in_use) == 0, | 290 | atomic_read(&caifd->in_use) == 0, |
290 | TIMEOUT); | 291 | TIMEOUT); |
@@ -300,6 +301,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, | |||
300 | "Unregistering an active CAIF device: %s\n", | 301 | "Unregistering an active CAIF device: %s\n", |
301 | __func__, dev->name); | 302 | __func__, dev->name); |
302 | cfcnfg_del_phy_layer(get_caif_conf(), &caifd->layer); | 303 | cfcnfg_del_phy_layer(get_caif_conf(), &caifd->layer); |
304 | dev_put(dev); | ||
303 | atomic_set(&caifd->state, what); | 305 | atomic_set(&caifd->state, what); |
304 | break; | 306 | break; |
305 | 307 | ||
@@ -326,7 +328,8 @@ struct cfcnfg *get_caif_conf(void) | |||
326 | EXPORT_SYMBOL(get_caif_conf); | 328 | EXPORT_SYMBOL(get_caif_conf); |
327 | 329 | ||
328 | int caif_connect_client(struct caif_connect_request *conn_req, | 330 | int caif_connect_client(struct caif_connect_request *conn_req, |
329 | struct cflayer *client_layer) | 331 | struct cflayer *client_layer, int *ifindex, |
332 | int *headroom, int *tailroom) | ||
330 | { | 333 | { |
331 | struct cfctrl_link_param param; | 334 | struct cfctrl_link_param param; |
332 | int ret; | 335 | int ret; |
@@ -334,8 +337,9 @@ int caif_connect_client(struct caif_connect_request *conn_req, | |||
334 | if (ret) | 337 | if (ret) |
335 | return ret; | 338 | return ret; |
336 | /* Hook up the adaptation layer. */ | 339 | /* Hook up the adaptation layer. */ |
337 | return cfcnfg_add_adaptation_layer(get_caif_conf(), | 340 | return cfcnfg_add_adaptation_layer(get_caif_conf(), ¶m, |
338 | ¶m, client_layer); | 341 | client_layer, ifindex, |
342 | headroom, tailroom); | ||
339 | } | 343 | } |
340 | EXPORT_SYMBOL(caif_connect_client); | 344 | EXPORT_SYMBOL(caif_connect_client); |
341 | 345 | ||