提交 e54d9eb9 编写于 作者: A Andres More 提交者: Greg Kroah-Hartman

Staging: vt6656: code cleanup in vt6656_suspend()/vt6656_resume()

Not changed PSDevice priv struct, just fixed style and removed printks.
Signed-off-by: NAndres More <more.andres@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 79566eb2
...@@ -718,33 +718,32 @@ static BOOL device_release_WPADEV(PSDevice pDevice) ...@@ -718,33 +718,32 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
static int vt6656_suspend(struct usb_interface *intf, pm_message_t message) static int vt6656_suspend(struct usb_interface *intf, pm_message_t message)
{ {
PSDevice pDevice = usb_get_intfdata(intf); PSDevice device = usb_get_intfdata(intf);
struct net_device *dev = pDevice->dev;
printk("VNTWUSB Suspend Start======>\n"); if (!device || !device->dev)
if(dev != NULL) { return -ENODEV;
if(pDevice->flags & DEVICE_FLAGS_OPENED)
device_close(dev); if (device->flags & DEVICE_FLAGS_OPENED)
} device_close(device->dev);
usb_put_dev(interface_to_usbdev(intf));
usb_put_dev(interface_to_usbdev(intf)); return 0;
return 0;
} }
static int vt6656_resume(struct usb_interface *intf) static int vt6656_resume(struct usb_interface *intf)
{ {
PSDevice pDevice = usb_get_intfdata(intf); PSDevice device = usb_get_intfdata(intf);
struct net_device *dev = pDevice->dev;
if (!device || !device->dev)
printk("VNTWUSB Resume Start======>\n"); return -ENODEV;
if(dev != NULL) {
usb_get_dev(interface_to_usbdev(intf)); usb_get_dev(interface_to_usbdev(intf));
if(!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
if(device_open(dev)!=0) if (!(device->flags & DEVICE_FLAGS_OPENED))
printk("VNTWUSB Resume Start======>open fail\n"); device_open(device->dev);
}
} return 0;
return 0;
} }
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册