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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
> > }
> > 
> > usb_get_port_dev() locates in the driver/usb/core/port.c and
> > usb_device_allow/prevent_power_off() locate in the include/linux/usb.h.
> 
> I was thinking more of something like this.  In port.c:
> 
> int usb_device_allow_prevent_power_off(struct usb_device *udev, bool allow)
> {
>         ...
> }

Please change the name. It looks like a contradiction in itself and would
thereby almost beg for misuse.

	Regards
		Oliver

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux