Skip to content

Commit

Permalink
V4L/DVB: tm6000: Use an enum for extension type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Aug 2, 2010
1 parent 54b7860 commit 39e1256
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/tm6000/tm6000-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/tm6000/tm6000-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 5 additions & 3 deletions drivers/staging/tm6000/tm6000.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
};
Expand Down

0 comments on commit 39e1256

Please sign in to comment.