diff options
author | Oliver Neukum <oliver@neukum.org> | 2012-12-17 23:46:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-19 15:46:40 -0500 |
commit | a5e40708c495e387a2351d5e89b0cf7f19175a57 (patch) | |
tree | d8270d2442d153853dfe01b069ee8dddd29583cb /drivers/net | |
parent | 2dd7c8cf29769f6b66f26b501db2364640c2c9d0 (diff) |
use generic usbnet_manage_power()
This covers the drivers that can use a primitive
implementation.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 10 | ||||
-rw-r--r-- | drivers/net/usb/cdc_ncm.c | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index a74f35f1403d..3f3d12d766e7 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -457,12 +457,6 @@ int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
457 | } | 457 | } |
458 | EXPORT_SYMBOL_GPL(usbnet_cdc_bind); | 458 | EXPORT_SYMBOL_GPL(usbnet_cdc_bind); |
459 | 459 | ||
460 | static int cdc_manage_power(struct usbnet *dev, int on) | ||
461 | { | ||
462 | dev->intf->needs_remote_wakeup = on; | ||
463 | return 0; | ||
464 | } | ||
465 | |||
466 | static const struct driver_info cdc_info = { | 460 | static const struct driver_info cdc_info = { |
467 | .description = "CDC Ethernet Device", | 461 | .description = "CDC Ethernet Device", |
468 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT, | 462 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT, |
@@ -470,7 +464,7 @@ static const struct driver_info cdc_info = { | |||
470 | .bind = usbnet_cdc_bind, | 464 | .bind = usbnet_cdc_bind, |
471 | .unbind = usbnet_cdc_unbind, | 465 | .unbind = usbnet_cdc_unbind, |
472 | .status = usbnet_cdc_status, | 466 | .status = usbnet_cdc_status, |
473 | .manage_power = cdc_manage_power, | 467 | .manage_power = usbnet_manage_power, |
474 | }; | 468 | }; |
475 | 469 | ||
476 | static const struct driver_info wwan_info = { | 470 | static const struct driver_info wwan_info = { |
@@ -479,7 +473,7 @@ static const struct driver_info wwan_info = { | |||
479 | .bind = usbnet_cdc_bind, | 473 | .bind = usbnet_cdc_bind, |
480 | .unbind = usbnet_cdc_unbind, | 474 | .unbind = usbnet_cdc_unbind, |
481 | .status = usbnet_cdc_status, | 475 | .status = usbnet_cdc_status, |
482 | .manage_power = cdc_manage_power, | 476 | .manage_power = usbnet_manage_power, |
483 | }; | 477 | }; |
484 | 478 | ||
485 | /*-------------------------------------------------------------------------*/ | 479 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index d38bc20a60e2..71b6e92b8e9b 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -1129,19 +1129,13 @@ static void cdc_ncm_disconnect(struct usb_interface *intf) | |||
1129 | usbnet_disconnect(intf); | 1129 | usbnet_disconnect(intf); |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | static int cdc_ncm_manage_power(struct usbnet *dev, int status) | ||
1133 | { | ||
1134 | dev->intf->needs_remote_wakeup = status; | ||
1135 | return 0; | ||
1136 | } | ||
1137 | |||
1138 | static const struct driver_info cdc_ncm_info = { | 1132 | static const struct driver_info cdc_ncm_info = { |
1139 | .description = "CDC NCM", | 1133 | .description = "CDC NCM", |
1140 | .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET, | 1134 | .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET, |
1141 | .bind = cdc_ncm_bind, | 1135 | .bind = cdc_ncm_bind, |
1142 | .unbind = cdc_ncm_unbind, | 1136 | .unbind = cdc_ncm_unbind, |
1143 | .check_connect = cdc_ncm_check_connect, | 1137 | .check_connect = cdc_ncm_check_connect, |
1144 | .manage_power = cdc_ncm_manage_power, | 1138 | .manage_power = usbnet_manage_power, |
1145 | .status = cdc_ncm_status, | 1139 | .status = cdc_ncm_status, |
1146 | .rx_fixup = cdc_ncm_rx_fixup, | 1140 | .rx_fixup = cdc_ncm_rx_fixup, |
1147 | .tx_fixup = cdc_ncm_tx_fixup, | 1141 | .tx_fixup = cdc_ncm_tx_fixup, |
@@ -1155,7 +1149,7 @@ static const struct driver_info wwan_info = { | |||
1155 | .bind = cdc_ncm_bind, | 1149 | .bind = cdc_ncm_bind, |
1156 | .unbind = cdc_ncm_unbind, | 1150 | .unbind = cdc_ncm_unbind, |
1157 | .check_connect = cdc_ncm_check_connect, | 1151 | .check_connect = cdc_ncm_check_connect, |
1158 | .manage_power = cdc_ncm_manage_power, | 1152 | .manage_power = usbnet_manage_power, |
1159 | .status = cdc_ncm_status, | 1153 | .status = cdc_ncm_status, |
1160 | .rx_fixup = cdc_ncm_rx_fixup, | 1154 | .rx_fixup = cdc_ncm_rx_fixup, |
1161 | .tx_fixup = cdc_ncm_tx_fixup, | 1155 | .tx_fixup = cdc_ncm_tx_fixup, |