Skip to content

Commit 787e614

Browse files
SlarkXiaokuba-moo
authored andcommitted
wwan: core: add print for wwan port attach/disconnect
Refer to USB serial device or net device, there is a notice to let end user know the status of device, like attached or disconnected. Add attach/disconnect print for wwan device as well. Signed-off-by: Slark Xiao <slark_xiao@163.com> Reviewed-by: Loic Poulain <loic.poulain@linaro.org> Link: https://lore.kernel.org/r/20230420023617.3919569-1-slark_xiao@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8fa66e4 commit 787e614

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/wwan/wwan_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ struct wwan_port *wwan_create_port(struct device *parent,
492492
if (err)
493493
goto error_put_device;
494494

495+
dev_info(&wwandev->dev, "port %s attached\n", dev_name(&port->dev));
495496
return port;
496497

497498
error_put_device:
@@ -517,6 +518,8 @@ void wwan_remove_port(struct wwan_port *port)
517518

518519
skb_queue_purge(&port->rxq);
519520
dev_set_drvdata(&port->dev, NULL);
521+
522+
dev_info(&wwandev->dev, "port %s disconnected\n", dev_name(&port->dev));
520523
device_unregister(&port->dev);
521524

522525
/* Release related wwan device */

0 commit comments

Comments
 (0)