Commit 4ea8b196 authored by Corentin Labbe's avatar Corentin Labbe Committed by Mauro Carvalho Chehab

media: zoran: constify struct tvnorm

The structure tvnorm could be consified.
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 30a97818
...@@ -256,7 +256,7 @@ struct videocodec { ...@@ -256,7 +256,7 @@ struct videocodec {
// set compression or decompression (or freeze, stop, standby, etc) // set compression or decompression (or freeze, stop, standby, etc)
int (*set_mode)(struct videocodec *codec, int mode); int (*set_mode)(struct videocodec *codec, int mode);
// setup picture size and norm (for the codec's video frontend) // setup picture size and norm (for the codec's video frontend)
int (*set_video)(struct videocodec *codec, struct tvnorm *norm, int (*set_video)(struct videocodec *codec, const struct tvnorm *norm,
struct vfe_settings *cap, struct vfe_polarity *pol); struct vfe_settings *cap, struct vfe_polarity *pol);
// other control commands, also mmap setup etc. // other control commands, also mmap setup etc.
int (*control)(struct videocodec *codec, int type, int size, void *data); int (*control)(struct videocodec *codec, int type, int size, void *data);
......
...@@ -227,7 +227,7 @@ struct card_info { ...@@ -227,7 +227,7 @@ struct card_info {
} input[BUZ_MAX_INPUT]; } input[BUZ_MAX_INPUT];
v4l2_std_id norms; v4l2_std_id norms;
struct tvnorm *tvn[3]; /* supported TV norms */ const struct tvnorm *tvn[3]; /* supported TV norms */
u32 jpeg_int; /* JPEG interrupt */ u32 jpeg_int; /* JPEG interrupt */
u32 vsync_int; /* VSYNC interrupt */ u32 vsync_int; /* VSYNC interrupt */
...@@ -266,7 +266,7 @@ struct zoran { ...@@ -266,7 +266,7 @@ struct zoran {
u8 initialized; /* flag if zoran has been correctly initialized */ u8 initialized; /* flag if zoran has been correctly initialized */
int user; /* number of current users */ int user; /* number of current users */
struct card_info card; struct card_info card;
struct tvnorm *timing; const struct tvnorm *timing;
unsigned short id; /* number of this device */ unsigned short id; /* number of this device */
char name[32]; /* name of this device */ char name[32]; /* name of this device */
......
...@@ -277,24 +277,24 @@ static char *codecid_to_modulename(u16 codecid) ...@@ -277,24 +277,24 @@ static char *codecid_to_modulename(u16 codecid)
// u16 Wt, Wa, HStart, HSyncStart, Ht, Ha, VStart; // u16 Wt, Wa, HStart, HSyncStart, Ht, Ha, VStart;
// }; // };
static struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 }; static const struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 };
static struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 }; static const struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 };
static struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 }; static const struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 };
static struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 }; static const struct tvnorm f60ccir601 = { 858, 720, 57, 788, 525, 480, 16 };
static struct tvnorm f50ccir601_lml33 = { 864, 720, 75 + 34, 804, 625, 576, 18 }; static const struct tvnorm f50ccir601_lml33 = { 864, 720, 75 + 34, 804, 625, 576, 18 };
static struct tvnorm f60ccir601_lml33 = { 858, 720, 57 + 34, 788, 525, 480, 16 }; static const struct tvnorm f60ccir601_lml33 = { 858, 720, 57 + 34, 788, 525, 480, 16 };
/* The DC10 (57/16/50) uses VActive as HSync, so HStart must be 0 */ /* The DC10 (57/16/50) uses VActive as HSync, so HStart must be 0 */
static struct tvnorm f50sqpixel_dc10 = { 944, 768, 0, 880, 625, 576, 0 }; static const struct tvnorm f50sqpixel_dc10 = { 944, 768, 0, 880, 625, 576, 0 };
static struct tvnorm f60sqpixel_dc10 = { 780, 640, 0, 716, 525, 480, 12 }; static const struct tvnorm f60sqpixel_dc10 = { 780, 640, 0, 716, 525, 480, 12 };
/* /*
* FIXME: I cannot swap U and V in saa7114, so i do one pixel left shift in zoran (75 -> 74) * FIXME: I cannot swap U and V in saa7114, so i do one pixel left shift in zoran (75 -> 74)
* (Maxim Yevtyushkin <max@linuxmedialabs.com>) * (Maxim Yevtyushkin <max@linuxmedialabs.com>)
*/ */
static struct tvnorm f50ccir601_lm33r10 = { 864, 720, 74 + 54, 804, 625, 576, 18 }; static const struct tvnorm f50ccir601_lm33r10 = { 864, 720, 74 + 54, 804, 625, 576, 18 };
static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56 + 54, 788, 525, 480, 16 }; static const struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56 + 54, 788, 525, 480, 16 };
/* /*
* FIXME: The ks0127 seem incapable of swapping U and V, too, which is why I copy Maxim's left * FIXME: The ks0127 seem incapable of swapping U and V, too, which is why I copy Maxim's left
...@@ -303,8 +303,8 @@ static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56 + 54, 788, 525, 480, 16 ...@@ -303,8 +303,8 @@ static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56 + 54, 788, 525, 480, 16
* Christer's driver used the unshifted norms, though... * Christer's driver used the unshifted norms, though...
* /Sam * /Sam
*/ */
static struct tvnorm f50ccir601_avs6eyes = { 864, 720, 74, 804, 625, 576, 18 }; static const struct tvnorm f50ccir601_avs6eyes = { 864, 720, 74, 804, 625, 576, 18 };
static struct tvnorm f60ccir601_avs6eyes = { 858, 720, 56, 788, 525, 480, 16 }; static const struct tvnorm f60ccir601_avs6eyes = { 858, 720, 56, 788, 525, 480, 16 };
static const unsigned short vpx3220_addrs[] = { 0x43, 0x47, I2C_CLIENT_END }; static const unsigned short vpx3220_addrs[] = { 0x43, 0x47, I2C_CLIENT_END };
static const unsigned short saa7110_addrs[] = { 0x4e, 0x4f, I2C_CLIENT_END }; static const unsigned short saa7110_addrs[] = { 0x4e, 0x4f, I2C_CLIENT_END };
......
...@@ -292,7 +292,7 @@ static void zr36057_adjust_vfe(struct zoran *zr, enum zoran_codec_mode mode) ...@@ -292,7 +292,7 @@ static void zr36057_adjust_vfe(struct zoran *zr, enum zoran_codec_mode mode)
static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height, static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
const struct zoran_format *format) const struct zoran_format *format)
{ {
struct tvnorm *tvn; const struct tvnorm *tvn;
unsigned int HStart, HEnd, VStart, VEnd; unsigned int HStart, HEnd, VStart, VEnd;
unsigned int DispMode; unsigned int DispMode;
unsigned int VidWinWid, VidWinHt; unsigned int VidWinWid, VidWinHt;
...@@ -510,7 +510,7 @@ static void init_jpeg_queue(struct zoran *zr) ...@@ -510,7 +510,7 @@ static void init_jpeg_queue(struct zoran *zr)
static void zr36057_set_jpg(struct zoran *zr, enum zoran_codec_mode mode) static void zr36057_set_jpg(struct zoran *zr, enum zoran_codec_mode mode)
{ {
struct tvnorm *tvn; const struct tvnorm *tvn;
u32 reg; u32 reg;
tvn = zr->timing; tvn = zr->timing;
......
...@@ -238,7 +238,7 @@ static int zr36016_set_mode(struct videocodec *codec, int mode) ...@@ -238,7 +238,7 @@ static int zr36016_set_mode(struct videocodec *codec, int mode)
} }
/* set picture size */ /* set picture size */
static int zr36016_set_video(struct videocodec *codec, struct tvnorm *norm, static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm,
struct vfe_settings *cap, struct vfe_polarity *pol) struct vfe_settings *cap, struct vfe_polarity *pol)
{ {
struct zr36016 *ptr = (struct zr36016 *)codec->data; struct zr36016 *ptr = (struct zr36016 *)codec->data;
......
...@@ -554,7 +554,7 @@ static int zr36050_set_mode(struct videocodec *codec, int mode) ...@@ -554,7 +554,7 @@ static int zr36050_set_mode(struct videocodec *codec, int mode)
} }
/* set picture size (norm is ignored as the codec doesn't know about it) */ /* set picture size (norm is ignored as the codec doesn't know about it) */
static int zr36050_set_video(struct videocodec *codec, struct tvnorm *norm, static int zr36050_set_video(struct videocodec *codec, const struct tvnorm *norm,
struct vfe_settings *cap, struct vfe_polarity *pol) struct vfe_settings *cap, struct vfe_polarity *pol)
{ {
struct zr36050 *ptr = (struct zr36050 *)codec->data; struct zr36050 *ptr = (struct zr36050 *)codec->data;
......
...@@ -477,7 +477,7 @@ static int zr36060_set_mode(struct videocodec *codec, int mode) ...@@ -477,7 +477,7 @@ static int zr36060_set_mode(struct videocodec *codec, int mode)
} }
/* set picture size (norm is ignored as the codec doesn't know about it) */ /* set picture size (norm is ignored as the codec doesn't know about it) */
static int zr36060_set_video(struct videocodec *codec, struct tvnorm *norm, static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm,
struct vfe_settings *cap, struct vfe_polarity *pol) struct vfe_settings *cap, struct vfe_polarity *pol)
{ {
struct zr36060 *ptr = (struct zr36060 *)codec->data; struct zr36060 *ptr = (struct zr36060 *)codec->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment