memstick: rtsx_usb_ms: Manage runtime PM when accessing the device
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 28 Sep 2016 18:33:28 +0000 (11:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 07:01:35 +0000 (03:01 -0400)
commit8dc22842bd73eab7701c02b5857e8b25afd349dc
treee08b3a853ffc2365f302a8e922fb7469bc512225
parentd538518771a659b2ef3014dce23244c19ede415d
memstick: rtsx_usb_ms: Manage runtime PM when accessing the device

commit 9158cb29e7c2f10dd325eb1589f0fe745a271257 upstream.

Accesses to the rtsx usb device, which is the parent of the rtsx memstick
device, must not be done unless it's runtime resumed. This is currently not
the case and it could trigger various errors.

Fix this by properly deal with runtime PM in this regards. This means
making sure the device is runtime resumed, when serving requests via the
->request() callback or changing settings via the ->set_param() callbacks.

Cc: Ritesh Raj Sarraf <rrs@researchut.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/memstick/host/rtsx_usb_ms.c