USB: fix interface runtime-PM settings
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 11 May 2010 15:44:06 +0000 (11:44 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:45 +0000 (13:21 -0700)
commit89842ae6515c49405e20c0629a6442b6885ad49d
treeaab7bc2ef74ffaf607ac1bcc5d2dbbfbc94eb13e
parent54b5acf3acb7a1f83ec281d111d3e2812cd7ad9d
USB: fix interface runtime-PM settings

This patch (as1379) reworks the logic for handling USB interface
runtime-PM settings -- hopefully it's right this time!  The problem is
that when a driver is unbound or binding fails, runtime PM for the
interface always gets disabled.  But pm_runtime_disable() nests, so it
shouldn't be called unless the interface was previously enabled for
runtime PM.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Rob Duncan <Robert.Duncan@exar.com>
Tested-by: Rob Duncan <Robert.Duncan@exar.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c