On Tue, 22 Jan 2013, Lan Tianyu wrote: > >> +/** > >> + * usb_device_control_power_off - Allow or prohibit power off device. > >> + * @udev: target usb device > >> + * @allow: choice of allow or prohibit > >> + * > >> + * Call pm_runtime_get/put_sync(portdev) to allow or prohibit target > >> + * usb device to be powered off in the kernel. The operations of setting > >> + * true and false should be couple. The default status is allowed. > >> + */ > >> +int usb_device_control_power_off(struct usb_device *udev, bool allow) > > > > Ick, again with the boolean variables. Please don't do this, just make > > two different functions: > > usb_device_allow_power_off() > > usb_device_forbid_power_off() > > that makes it much easier to understand when you see the function being > > called, right? > Ok. I will do it. Greg and Tianyu: You both missed the fact that Tianyu already did this. It is in the submitted patch. The two functions Greg asked for are defined as inline routines. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html