aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/kinect.c
diff options
context:
space:
mode:
authorDrew Fisher <drew.m.fisher@gmail.com>2011-04-21 05:51:34 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 08:30:57 -0400
commitbb066467aa1af2d45ffbfcbba32c0bde201c8eb4 (patch)
tree32ca54eb02750521ce59ceb99d3443bf0b46f378 /drivers/media/video/gspca/kinect.c
parentaff8ab5cc11c2c14b7ae3bb38cbe012c43b7dcef (diff)
[media] gspca - kinect: move communications buffers out of stack
Move large communications buffers out of stack and into device structure. This prevents the frame size from being >1kB and fixes a compiler warning when CONFIG_FRAME_WARN=1024: drivers/media/video/gspca/kinect.c: In function ‘send_cmd.clone.0’: drivers/media/video/gspca/kinect.c:202: warning: the frame size of 1548 bytes is larger than 1024 bytes Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/kinect.c')
-rw-r--r--drivers/media/video/gspca/kinect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/kinect.c b/drivers/media/video/gspca/kinect.c
index f85e746665cc..79c4ef520ee1 100644
--- a/drivers/media/video/gspca/kinect.c
+++ b/drivers/media/video/gspca/kinect.c
@@ -62,6 +62,8 @@ struct sd {
62 struct gspca_dev gspca_dev; /* !! must be the first item */ 62 struct gspca_dev gspca_dev; /* !! must be the first item */
63 uint16_t cam_tag; /* a sequence number for packets */ 63 uint16_t cam_tag; /* a sequence number for packets */
64 uint8_t stream_flag; /* to identify different steram types */ 64 uint8_t stream_flag; /* to identify different steram types */
65 uint8_t obuf[0x400]; /* output buffer for control commands */
66 uint8_t ibuf[0x200]; /* input buffer for control commands */
65}; 67};
66 68
67/* V4L2 controls supported by the driver */ 69/* V4L2 controls supported by the driver */
@@ -133,8 +135,8 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf,
133 struct sd *sd = (struct sd *) gspca_dev; 135 struct sd *sd = (struct sd *) gspca_dev;
134 struct usb_device *udev = gspca_dev->dev; 136 struct usb_device *udev = gspca_dev->dev;
135 int res, actual_len; 137 int res, actual_len;
136 uint8_t obuf[0x400]; 138 uint8_t *obuf = sd->obuf;
137 uint8_t ibuf[0x200]; 139 uint8_t *ibuf = sd->ibuf;
138 struct cam_hdr *chdr = (void *)obuf; 140 struct cam_hdr *chdr = (void *)obuf;
139 struct cam_hdr *rhdr = (void *)ibuf; 141 struct cam_hdr *rhdr = (void *)ibuf;
140 142