aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.h
diff options
context:
space:
mode:
authorErik Andren <erik.andren@gmail.com>2008-10-03 07:46:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:13 -0400
commite293e599524f74532b0add53ddf80f10ff854598 (patch)
treeec8306de58b273b79e507df183f0d9cec835ef5d /drivers/media/video/gspca/gspca.h
parentc109f8168f259ea1f1ab7009c6b99dbe8ea0e2b2 (diff)
V4L/DVB (9093): gspca: Cleanup code and small changes.
- convert some #define to enum. - remove some comments. - return ENOMEM on memory allocation failure. Signed-off-by: Erik Andren <erik.andren@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r--drivers/media/video/gspca/gspca.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index f9006542c58f..4779dd0b06da 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -106,10 +106,12 @@ struct sd_desc {
106}; 106};
107 107
108/* packet types when moving from iso buf to frame buf */ 108/* packet types when moving from iso buf to frame buf */
109#define DISCARD_PACKET 0 109enum gspca_packet_type {
110#define FIRST_PACKET 1 110 DISCARD_PACKET,
111#define INTER_PACKET 2 111 FIRST_PACKET,
112#define LAST_PACKET 3 112 INTER_PACKET,
113 LAST_PACKET
114};
113 115
114struct gspca_frame { 116struct gspca_frame {
115 __u8 *data; /* frame buffer */ 117 __u8 *data; /* frame buffer */
@@ -175,7 +177,7 @@ int gspca_dev_probe(struct usb_interface *intf,
175 struct module *module); 177 struct module *module);
176void gspca_disconnect(struct usb_interface *intf); 178void gspca_disconnect(struct usb_interface *intf);
177struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, 179struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
178 int packet_type, 180 enum gspca_packet_type packet_type,
179 struct gspca_frame *frame, 181 struct gspca_frame *frame,
180 const __u8 *data, 182 const __u8 *data,
181 int len); 183 int len);