V4L/DVB: tm6000: Use an enum for extension type
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 3 Jun 2010 19:31:20 +0000 (16:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 17:05:52 +0000 (14:05 -0300)
In order to better document and be sure that the values are used
at the proper places, convert extension type into an enum and
name it as "type", instead of "id".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-alsa.c
drivers/staging/tm6000/tm6000-dvb.c
drivers/staging/tm6000/tm6000.h

index 745f8de9ff910d5e82437f9f933c2cf7c899b786..de5e78d4b54a163a3452bc5bbee4b2b4b6ce547c 100644 (file)
@@ -392,7 +392,7 @@ static int tm6000_audio_fini(struct tm6000_core *dev)
 }
 
 struct tm6000_ops audio_ops = {
-       .id     = TM6000_AUDIO,
+       .type   = TM6000_AUDIO,
        .name   = "TM6000 Audio Extension",
        .init   = tm6000_audio_init,
        .fini   = tm6000_audio_fini,
index d3529ae73e2f137b8eae5992756b842c96554e7a..f501edccf9c4c8f4327d0e8aab82853c3c60587a 100644 (file)
@@ -432,7 +432,7 @@ static int dvb_fini(struct tm6000_core *dev)
 }
 
 static struct tm6000_ops dvb_ops = {
-       .id     = TM6000_DVB,
+       .type   = TM6000_DVB,
        .name   = "TM6000 dvb Extension",
        .init   = dvb_init,
        .fini   = dvb_fini,
index a1d96d619734e35cd9c3b97e95d95fec1e484b2b..8fccf3e4d8f614c9b98e7c5604a5731acee164aa 100644 (file)
@@ -218,13 +218,15 @@ struct tm6000_core {
        spinlock_t                   slock;
 };
 
-#define TM6000_AUDIO 0x10
-#define TM6000_DVB     0x20
+enum tm6000_ops_type {
+       TM6000_AUDIO = 0x10,
+       TM6000_DVB = 0x20,
+};
 
 struct tm6000_ops {
        struct list_head        next;
        char                    *name;
-       int                     id;
+       enum tm6000_ops_type    type;
        int (*init)(struct tm6000_core *);
        int (*fini)(struct tm6000_core *);
 };