Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usbnet: dm9601: apply usbnet_link_change

Use usbnet_link_change to handle link change centrally.

Cc: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ming Lei and committed by
David S. Miller
c10b1710 418fc57a

+1 -6
+1 -6
drivers/net/usb/dm9601.c
··· 524 524 525 525 link = !!(buf[0] & 0x40); 526 526 if (netif_carrier_ok(dev->net) != link) { 527 - if (link) { 528 - netif_carrier_on(dev->net); 529 - usbnet_defer_kevent (dev, EVENT_LINK_RESET); 530 - } 531 - else 532 - netif_carrier_off(dev->net); 527 + usbnet_link_change(dev, link, 1); 533 528 netdev_dbg(dev->net, "Link Status is: %d\n", link); 534 529 } 535 530 }