Re: [linux-usb-devel] alternate interface for manageing autosuspend

2006-10-28 Thread Alan Stern
On Sat, 28 Oct 2006, Oliver Neukum wrote: > > +static int usb_autopm_do_device(struct usb_device *udev, int inc_usage_cnt) > > +{ > > + int status; > > + > > + usb_pm_lock(udev); > > + udev->pm_usage_cnt += inc_usage_cnt; > > + if (udev->pm_usage_cnt > 0) { > > + udev->auto_p

Re: [linux-usb-devel] alternate interface for manageing autosuspend

2006-10-28 Thread Oliver Neukum
Am Samstag, 28. Oktober 2006 17:22 schrieb Alan Stern: > Oliver: > > Here's an improved API for managing autosuspend calls. It lets you do > what you want and it saves code space at the same time! > > Your usb_autopm_enable() and usb_autopm_disable() routines can easily be > implemented using t

Re: [linux-usb-devel] alternate interface for manageing autosuspend

2006-10-28 Thread Alan Stern
Oliver: Here's an improved API for managing autosuspend calls. It lets you do what you want and it saves code space at the same time! Your usb_autopm_enable() and usb_autopm_disable() routines can easily be implemented using this API as follows: #define usb_autopm_enable(intf) do {

Re: [linux-usb-devel] alternate interface for manageing autosuspend

2006-10-15 Thread Alan Stern
On Sun, 15 Oct 2006, Oliver Neukum wrote: > Hi, > > this is a simpler interface for autosuspend on interfaces. It > is needed for autosuspending in the HID driver. Maybe this should just replace the original routines. The only difference is whether intf->pm_usage_cnt gets changed while the usb_