summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.h
diff options
context:
space:
mode:
authorErik Andren <erik.andren@gmail.com>2008-10-03 13:46:50 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 13:37:13 +0200
commite293e599524f74532b0add53ddf80f10ff854598 (patch)
treeec8306de58b273b79e507df183f0d9cec835ef5d /drivers/media/video/gspca/gspca.h
parentV4L/DVB (9091): gspca: Subdriver m5602 (ALi) added. (diff)
downloadlinux-e293e599524f74532b0add53ddf80f10ff854598.tar.xz
linux-e293e599524f74532b0add53ddf80f10ff854598.zip
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 {
};
/* packet types when moving from iso buf to frame buf */
-#define DISCARD_PACKET 0
-#define FIRST_PACKET 1
-#define INTER_PACKET 2
-#define LAST_PACKET 3
+enum gspca_packet_type {
+ DISCARD_PACKET,
+ FIRST_PACKET,
+ INTER_PACKET,
+ LAST_PACKET
+};
struct gspca_frame {
__u8 *data; /* frame buffer */
@@ -175,7 +177,7 @@ int gspca_dev_probe(struct usb_interface *intf,
struct module *module);
void gspca_disconnect(struct usb_interface *intf);
struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
- int packet_type,
+ enum gspca_packet_type packet_type,
struct gspca_frame *frame,
const __u8 *data,
int len);