]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: fix warning caused by autosuspend counter going negative
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 20 Jul 2007 03:44:51 +0000 (20:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Aug 2007 21:27:30 +0000 (14:27 -0700)
commit5242d7efa822a1b20f0c51d438fbe2e47958400a
tree33ad1b06cce88d66e630dd20ea462984063bb024
parentfa10a71942870a670113152f1d948393636d3c4a
USB: fix warning caused by autosuspend counter going negative

This patch (as937) fixes a minor bug in the autosuspend usage-counting
code.  Each hub's usage counter keeps track of the number of
unsuspended children.  However the current driver increments the
counter after registering a new child, by which time the child may
already have been suspended and caused the counter to go negative.
The obvious solution is to increment the counter before registering
the child.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c