]> err.no Git - linux-2.6/commit
USB: fix warning caused by autosuspend counter going negative
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 16 Jul 2007 19:28:19 +0000 (15:28 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 20 Jul 2007 00:46:04 +0000 (17:46 -0700)
commit195af2cce5ff81c4609c7ba585b6698a7771cbfc
treed5367fb5a16f6b0403e91d75aa3cc4c4ba05adfd
parent69d42a78f935d19384d1f6e4f94b65bb162b36df
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c