aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 07:39:50 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:41 -0500
commit505b6d0b774fa4475fedbd3cebf95199c17a0086 (patch)
treeea8fe176eba79808734e5d23241f67d0dbd1cc91 /drivers/media/video/em28xx/em28xx.h
parentd4d889e329bd0837598b3ef611806421754e9b83 (diff)
V4L/DVB (9752): Remove duplicated fields on em28xx_board and em28xx structs
Several fields are duplicated on both structs. Let's just copy em28xx_board instead. A later cleanup could just copy the fields that are changed, in order to keep em28xx_board const. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 059cc7f43b56..e33aa544bbbc 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -328,6 +328,7 @@ struct em28xx_reg_seq {
328 328
329struct em28xx_board { 329struct em28xx_board {
330 char *name; 330 char *name;
331 int vchannels;
331 int tuner_type; 332 int tuner_type;
332 int tuner_addr; 333 int tuner_addr;
333 334
@@ -416,18 +417,12 @@ struct em28xx {
416 int model; /* index in the device_data struct */ 417 int model; /* index in the device_data struct */
417 int devno; /* marks the number of this device */ 418 int devno; /* marks the number of this device */
418 enum em28xx_chip_id chip_id; 419 enum em28xx_chip_id chip_id;
419 unsigned int is_em2800:1; 420
420 unsigned int has_msp34xx:1; 421 struct em28xx_board board;
421 unsigned int has_tda9887:1; 422
422 unsigned int stream_on:1; /* Locks streams */ 423 unsigned int stream_on:1; /* Locks streams */
423 unsigned int has_audio_class:1; 424 unsigned int has_audio_class:1;
424 unsigned int has_alsa_audio:1; 425 unsigned int has_alsa_audio:1;
425 unsigned int max_range_640_480:1;
426 unsigned int has_dvb:1;
427 unsigned int has_snapshot_button:1;
428 unsigned int valid:1; /* report for validated boards */
429
430 unsigned char xclk, i2c_speed;
431 426
432 struct em28xx_IR *ir; 427 struct em28xx_IR *ir;
433 428
@@ -444,7 +439,6 @@ struct em28xx {
444 439
445 u32 i2s_speed; /* I2S speed for audio digital stream */ 440 u32 i2s_speed; /* I2S speed for audio digital stream */
446 441
447 enum em28xx_decoder decoder;
448 struct em28xx_audio_mode audio_mode; 442 struct em28xx_audio_mode audio_mode;
449 443
450 int tuner_type; /* type of the tuner */ 444 int tuner_type; /* type of the tuner */
@@ -527,9 +521,6 @@ struct em28xx {
527 /* Caches GPO and GPIO registers */ 521 /* Caches GPO and GPIO registers */
528 unsigned char reg_gpo, reg_gpio; 522 unsigned char reg_gpo, reg_gpio;
529 523
530 /* Infrared remote control support */
531 IR_KEYTAB_TYPE *ir_codes;
532
533 /* Snapshot button */ 524 /* Snapshot button */
534 char snapshot_button_path[30]; /* path of the input dev */ 525 char snapshot_button_path[30]; /* path of the input dev */
535 struct input_dev *sbutton_input_dev; 526 struct input_dev *sbutton_input_dev;
@@ -699,7 +690,7 @@ static inline int em28xx_gamma_set(struct em28xx *dev, s32 val)
699/*FIXME: maxw should be dependent of alt mode */ 690/*FIXME: maxw should be dependent of alt mode */
700static inline unsigned int norm_maxw(struct em28xx *dev) 691static inline unsigned int norm_maxw(struct em28xx *dev)
701{ 692{
702 if (dev->max_range_640_480) 693 if (dev->board.max_range_640_480)
703 return 640; 694 return 640;
704 else 695 else
705 return 720; 696 return 720;
@@ -707,7 +698,7 @@ static inline unsigned int norm_maxw(struct em28xx *dev)
707 698
708static inline unsigned int norm_maxh(struct em28xx *dev) 699static inline unsigned int norm_maxh(struct em28xx *dev)
709{ 700{
710 if (dev->max_range_640_480) 701 if (dev->board.max_range_640_480)
711 return 480; 702 return 480;
712 else 703 else
713 return (dev->norm & V4L2_STD_625_50) ? 576 : 480; 704 return (dev->norm & V4L2_STD_625_50) ? 576 : 480;