Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-07 Thread Oliver Neukum
On Tuesday 08 January 2013 14:38:27 Lan Tianyu wrote: > On 2013年01月07日 15:43, Oliver Neukum wrote: > > Please change the name. It looks like a contradiction in itself and would > > thereby almost beg for misuse. > > > Hi Oliver: > how about "usb_device_control_power_off(struct usb_device *u

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-07 Thread Lan Tianyu
On 2013年01月07日 15:43, Oliver Neukum wrote: > On Saturday 05 January 2013 13:58:27 Alan Stern wrote: >>> static int inline usb_device_prevent_power_off(struct usb_device *udev) >>> { >>> struct device *dev = usb_get_port_dev(udev); >>> >>> if(!dev) >>> return -ENODEV; >>> >

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-07 Thread Oliver Neukum
On Saturday 05 January 2013 13:58:27 Alan Stern wrote: > > static int inline usb_device_prevent_power_off(struct usb_device *udev) > > { > > struct device *dev = usb_get_port_dev(udev); > > > > if(!dev) > > return -ENODEV; > > > > return pm_runtime_get_sync(dev); >

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-05 Thread Alan Stern
On Sat, 5 Jan 2013, Lan Tianyu wrote: > On 2013年01月04日 23:59, Alan Stern wrote: > > On Fri, 4 Jan 2013, Lan Tianyu wrote: > > > >> Some usb devices can't be resumed correctly after power off. This > >> patch is to add usb_device_allow_power_off() for device's driver to allow > >> or > >> prohibi

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-04 Thread Lan Tianyu
On 2013年01月04日 23:59, Alan Stern wrote: > On Fri, 4 Jan 2013, Lan Tianyu wrote: > >> Some usb devices can't be resumed correctly after power off. This >> patch is to add usb_device_allow_power_off() for device's driver to allow or >> prohibit device to be power off the device. Call pm_runtime_get_

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-04 Thread Alan Stern
On Fri, 4 Jan 2013, Lan Tianyu wrote: > Some usb devices can't be resumed correctly after power off. This > patch is to add usb_device_allow_power_off() for device's driver to allow or > prohibit device to be power off the device. Call pm_runtime_get_sync(portdev) > to increase port's usage count

[PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-04 Thread Lan Tianyu
Some usb devices can't be resumed correctly after power off. This patch is to add usb_device_allow_power_off() for device's driver to allow or prohibit device to be power off the device. Call pm_runtime_get_sync(portdev) to increase port's usage count and then port will not be suspended. The device