]> git.baikalelectronics.ru Git - kernel.git/commit
Partly revert "[media] uvcvideo: Set error_idx properly for extended controls API...
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 23 Dec 2012 13:39:32 +0000 (14:39 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 23 Dec 2012 17:39:14 +0000 (09:39 -0800)
commit0456dab2791ce5935b8900a7c6153c3c2b7ecb10
tree3a694f797800c0f3c34fb4f6148c824f64b5ca68
parent5422c341efbe435b6c6ebad89d178413bd470231
Partly revert "[media] uvcvideo: Set error_idx properly for extended controls API failures"

Commit e8eb43a256e8 ("[media] uvcvideo: Set error_idx properly for
extended controls API failures") causes user space to behave incorrectly
on one of my test machines (there is no sound under KDE 4.9.4 using
pulseaudio and there is a knotify4 process occupying one of the CPU
cores 100% of the time).  Reverting that commit entirely fixes the
problem for me.

However, commit e8eb43a256e8 appears to do more than it follows from its
changelog, because the changelog only says about the changes related to
ctrls->error_idx, while the commit additionally changes error codes
returned by various functions in uvc_ctrl.c and uvc_v4l2.c.  It turns
out that the changes of the returned error codes confuse the user spce,
so it is sufficient to revert the part of commit e8eb43a256e8 not
mentioned in its changelog to fix the problem.

[ 'ENOENT' is not a valid error return from an ioctl to begin with, and
  I don't understand how anybody ever even thought it would be.  - Linus ]

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/media/usb/uvc/uvc_ctrl.c
drivers/media/usb/uvc/uvc_v4l2.c