* [PATCH 2/3] usbnet: generic manage_power()
@ 2012-12-18 14:45 Oliver Neukum
2012-12-19 20:47 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2012-12-18 14:45 UTC (permalink / raw)
To: netdev, davem; +Cc: Oliver Neukum, Oliver Neukum
Centralise common code for manage_power() in usbnet
by making a generic simple implementation
Signed-off-by: Oliver Neukum <oneukum@suse.de>
---
drivers/net/usb/usbnet.c | 10 ++++++++++
include/linux/usb/usbnet.h | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 50ed7ab..3d4bf01 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1616,6 +1616,16 @@ void usbnet_device_suggests_idle(struct usbnet *dev)
}
EXPORT_SYMBOL(usbnet_device_suggests_idle);
+/*
+ * For devices that can do without special commands
+ */
+int usbnet_manage_power(struct usbnet *dev, int on)
+{
+ dev->intf->needs_remote_wakeup = on;
+ return 0;
+}
+EXPORT_SYMBOL(usbnet_manage_power);
+
/*-------------------------------------------------------------------------*/
static int __usbnet_read_cmd(struct usbnet *dev, u8 cmd, u8 reqtype,
u16 value, u16 index, void *data, u16 size)
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 288b32a..bd45eb7 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -241,4 +241,6 @@ extern void usbnet_set_msglevel(struct net_device *, u32);
extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
extern int usbnet_nway_reset(struct net_device *net);
+extern int usbnet_manage_power(struct usbnet *, int);
+
#endif /* __LINUX_USB_USBNET_H */
--
1.7.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/3] usbnet: generic manage_power()
2012-12-18 14:45 [PATCH 2/3] usbnet: generic manage_power() Oliver Neukum
@ 2012-12-19 20:47 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-12-19 20:47 UTC (permalink / raw)
To: oliver; +Cc: netdev, oneukum
From: Oliver Neukum <oliver@neukum.org>
Date: Tue, 18 Dec 2012 15:45:52 +0100
> Centralise common code for manage_power() in usbnet
> by making a generic simple implementation
>
> Signed-off-by: Oliver Neukum <oneukum@suse.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-19 20:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 14:45 [PATCH 2/3] usbnet: generic manage_power() Oliver Neukum
2012-12-19 20:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).