]> git.baikalelectronics.ru Git - kernel.git/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)
commitfbc9c04d16960a7d98d4536fc8b1f9d5faf1023d
treed5367fb5a16f6b0403e91d75aa3cc4c4ba05adfd
parent09050f1a49da0e97597ceb41f1de4112397f0585
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