summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/huawei_cdc_ncm.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2014-05-16 21:48:28 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-16 22:39:02 -0400
commitfa83dbeee55865678025b6c1637ca08860209f87 (patch)
tree56ffa4f18336e8e9f1d1e0db7a32ccaa3cddc386 /drivers/net/usb/huawei_cdc_ncm.c
parent916f76405fe6f1ae2d0b60841343782f0575ab0a (diff)
downloadlinux-fa83dbeee55865678025b6c1637ca08860209f87.tar.bz2
net: cdc_ncm: remove redundant "disconnected" flag
Calling netif_carrier_{on,off} is sufficient. There is no need to duplicate the carrier state in a driver specific flag. Acked-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/huawei_cdc_ncm.c')
-rw-r--r--drivers/net/usb/huawei_cdc_ncm.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/usb/huawei_cdc_ncm.c b/drivers/net/usb/huawei_cdc_ncm.c
index 312178d7b698..f9822bc75425 100644
--- a/drivers/net/usb/huawei_cdc_ncm.c
+++ b/drivers/net/usb/huawei_cdc_ncm.c
@@ -172,24 +172,11 @@ err:
return ret;
}
-static int huawei_cdc_ncm_check_connect(struct usbnet *usbnet_dev)
-{
- struct cdc_ncm_ctx *ctx;
-
- ctx = (struct cdc_ncm_ctx *)usbnet_dev->data[0];
-
- if (ctx == NULL)
- return 1; /* disconnected */
-
- return !ctx->connected;
-}
-
static const struct driver_info huawei_cdc_ncm_info = {
.description = "Huawei CDC NCM device",
.flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET | FLAG_WWAN,
.bind = huawei_cdc_ncm_bind,
.unbind = huawei_cdc_ncm_unbind,
- .check_connect = huawei_cdc_ncm_check_connect,
.manage_power = huawei_cdc_ncm_manage_power,
.rx_fixup = cdc_ncm_rx_fixup,
.tx_fixup = cdc_ncm_tx_fixup,