diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:50:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:50:49 -0500 |
commit | 3e7468313758913c5e4d372f35b271b96bad1298 (patch) | |
tree | eb612d252a9e2349a1173451cd779beebd18a33e /drivers/media/video/gspca/sonixb.c | |
parent | 6825fbc4cb219f2c98bb7d157915d797cf5cb823 (diff) | |
parent | e97f4677961f68e29bd906022ebf60a6df7f530a (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (345 commits)
V4L/DVB (13542): ir-keytable: Allow dynamic table change
V4L/DVB (13541): atbm8830: replace 64-bit division and floating point usage
V4L/DVB (13540): ir-common: Cleanup get key evdev code
V4L/DVB (13539): ir-common: add __func__ for debug messages
V4L/DVB (13538): ir-common: Use a dynamic keycode table
V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation
V4L/DVB (13536): em28xx: Use the full RC5 code on HVR-950 Remote Controller
V4L/DVB (13535): ir-common: Add a hauppauge new table with the complete RC5 code
V4L/DVB (13534): ir-common: Remove some unused fields/structs
V4L/DVB (13533): ir: use dynamic tables, instead of static ones
V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table
V4L/DVB (13531): ir-common: rename the debug routine to allow exporting it
V4L/DVB (13458): go7007: subdev conversion
V4L/DVB (13457): s2250: subdev conversion
V4L/DVB (13456): s2250: Change module structure
V4L/DVB (13528): em28xx: add support for em2800 VC211A card
em28xx: don't reduce scale to half size for em2800
em28xx: don't load audio modules when AC97 is mis-detected
em28xx: em2800 chips support max width of 640
V4L/DVB (13523): dvb-bt8xx: fix compile warning
...
Fix up trivial conflicts due to spelling fixes from the trivial tree in
Documentation/video4linux/gspca.txt
drivers/media/video/cx18/cx18-mailbox.h
Diffstat (limited to 'drivers/media/video/gspca/sonixb.c')
-rw-r--r-- | drivers/media/video/gspca/sonixb.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index e39efb45fa1c..5be95bc65138 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c | |||
@@ -995,8 +995,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) | |||
995 | } | 995 | } |
996 | 996 | ||
997 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, | 997 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
998 | struct gspca_frame *frame, /* target */ | 998 | u8 *data, /* isoc packet */ |
999 | unsigned char *data, /* isoc packet */ | ||
1000 | int len) /* iso packet length */ | 999 | int len) /* iso packet length */ |
1001 | { | 1000 | { |
1002 | int i; | 1001 | int i; |
@@ -1054,12 +1053,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
1054 | pkt_type = DISCARD_PACKET; | 1053 | pkt_type = DISCARD_PACKET; |
1055 | } | 1054 | } |
1056 | 1055 | ||
1057 | frame = gspca_frame_add(gspca_dev, pkt_type, | 1056 | gspca_frame_add(gspca_dev, pkt_type, |
1058 | frame, data, 0); | 1057 | NULL, 0); |
1059 | data += i + fr_h_sz; | 1058 | data += i + fr_h_sz; |
1060 | len -= i + fr_h_sz; | 1059 | len -= i + fr_h_sz; |
1061 | gspca_frame_add(gspca_dev, FIRST_PACKET, | 1060 | gspca_frame_add(gspca_dev, FIRST_PACKET, |
1062 | frame, data, len); | 1061 | data, len); |
1063 | return; | 1062 | return; |
1064 | } | 1063 | } |
1065 | } | 1064 | } |
@@ -1068,15 +1067,21 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
1068 | if (cam->cam_mode[gspca_dev->curr_mode].priv & MODE_RAW) { | 1067 | if (cam->cam_mode[gspca_dev->curr_mode].priv & MODE_RAW) { |
1069 | /* In raw mode we sometimes get some garbage after the frame | 1068 | /* In raw mode we sometimes get some garbage after the frame |
1070 | ignore this */ | 1069 | ignore this */ |
1071 | int used = frame->data_end - frame->data; | 1070 | struct gspca_frame *frame; |
1071 | int used; | ||
1072 | int size = cam->cam_mode[gspca_dev->curr_mode].sizeimage; | 1072 | int size = cam->cam_mode[gspca_dev->curr_mode].sizeimage; |
1073 | 1073 | ||
1074 | frame = gspca_get_i_frame(gspca_dev); | ||
1075 | if (frame == NULL) { | ||
1076 | gspca_dev->last_packet_type = DISCARD_PACKET; | ||
1077 | return; | ||
1078 | } | ||
1079 | used = frame->data_end - frame->data; | ||
1074 | if (used + len > size) | 1080 | if (used + len > size) |
1075 | len = size - used; | 1081 | len = size - used; |
1076 | } | 1082 | } |
1077 | 1083 | ||
1078 | gspca_frame_add(gspca_dev, INTER_PACKET, | 1084 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
1079 | frame, data, len); | ||
1080 | } | 1085 | } |
1081 | 1086 | ||
1082 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) | 1087 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) |