summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/hdpvr/hdpvr.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-29 03:55:15 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 11:35:47 -0300
commit5f454d82e5958e59c16580b9b4531f4bbc7231f7 (patch)
tree323852d98e5d31124955295f508e2c815941cbbe /drivers/media/usb/hdpvr/hdpvr.h
parent79f10b625e5eff93c8fad54ba345e5f35feb8461 (diff)
downloadop-kernel-dev-5f454d82e5958e59c16580b9b4531f4bbc7231f7.zip
op-kernel-dev-5f454d82e5958e59c16580b9b4531f4bbc7231f7.tar.gz
[media] hdpvr: improve error handling
get_video_info() should never return EFAULT, instead it should return the low-level usb_control_msg() error. Add a valid field to the hdpvr_video_info struct so the driver can easily check if a valid format was detected. Whenever get_video_info is called and it returns an error (e.g. usb_control_msg failed), then return that error to userspace as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/hdpvr/hdpvr.h')
-rw-r--r--drivers/media/usb/hdpvr/hdpvr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr.h b/drivers/media/usb/hdpvr/hdpvr.h
index 808ea7a..dc685d4 100644
--- a/drivers/media/usb/hdpvr/hdpvr.h
+++ b/drivers/media/usb/hdpvr/hdpvr.h
@@ -154,6 +154,7 @@ struct hdpvr_video_info {
u16 width;
u16 height;
u8 fps;
+ bool valid;
};
enum {
OpenPOWER on IntegriCloud