[media] gspca: Fix input urb creation / destruction surrounding suspend resume
authorHans de Goede <hdegoede@redhat.com>
Sun, 9 Sep 2012 11:04:05 +0000 (08:04 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 13 Sep 2012 20:53:10 +0000 (17:53 -0300)
commit36adfca94a354b10b4e36684a45e830f6817b067
treebc4d31761f9203b76a9d0ea944f61ed2d5d9aa4b
parent844db450e6e2cf710752af1a019a877af390b541
[media] gspca: Fix input urb creation / destruction surrounding suspend resume

1) We always re-create the input-urb on resume, so we must also always
   destroy it on suspend to avoid leaking it
2) If we're going to do an init_transfer, then that will destroy the urb
   before starting the stream (nop if there is none), and (re-)create it
   once the stream is started. So there is little use in creating it, if
   we're going to do an init_transfer immediately afterward

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/gspca/gspca.c