Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357239
b: refs/heads/master
c: c19bec5
h: refs/heads/master
i:
  357237: 6890577
  357235: 3361713
  357231: 5b07e07
v: v3
  • Loading branch information
Kirill Smelkov authored and Mauro Carvalho Chehab committed Dec 28, 2012
1 parent 91aabf0 commit eea8495
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0322bd3980b3ebf7dde8474e22614cb443d6479a
refs/heads/master: c19bec500168108bf28710fae304523679ffb40f
26 changes: 13 additions & 13 deletions trunk/drivers/media/platform/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ static const struct v4l2_fract
------------------------------------------------------------------*/

struct vivi_fmt {
char *name;
const char *name;
u32 fourcc; /* v4l2 format id */
u8 depth;
bool is_yuv;
};

static struct vivi_fmt formats[] = {
static const struct vivi_fmt formats[] = {
{
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV,
Expand Down Expand Up @@ -164,9 +164,9 @@ static struct vivi_fmt formats[] = {
},
};

static struct vivi_fmt *__get_format(u32 pixelformat)
static const struct vivi_fmt *__get_format(u32 pixelformat)
{
struct vivi_fmt *fmt;
const struct vivi_fmt *fmt;
unsigned int k;

for (k = 0; k < ARRAY_SIZE(formats); k++) {
Expand All @@ -181,7 +181,7 @@ static struct vivi_fmt *__get_format(u32 pixelformat)
return &formats[k];
}

static struct vivi_fmt *get_format(struct v4l2_format *f)
static const struct vivi_fmt *get_format(struct v4l2_format *f)
{
return __get_format(f->fmt.pix.pixelformat);
}
Expand All @@ -191,7 +191,7 @@ struct vivi_buffer {
/* common v4l buffer stuff -- must be first */
struct vb2_buffer vb;
struct list_head list;
struct vivi_fmt *fmt;
const struct vivi_fmt *fmt;
};

struct vivi_dmaqueue {
Expand Down Expand Up @@ -250,7 +250,7 @@ struct vivi_dev {
int input;

/* video capture */
struct vivi_fmt *fmt;
const struct vivi_fmt *fmt;
struct v4l2_fract timeperframe;
unsigned int width, height;
struct vb2_queue vb_vidq;
Expand Down Expand Up @@ -297,7 +297,7 @@ struct bar_std {

/* Maximum number of bars are 10 - otherwise, the input print code
should be modified */
static struct bar_std bars[] = {
static const struct bar_std bars[] = {
{ /* Standard ITU-R color bar sequence */
{ COLOR_WHITE, COLOR_AMBER, COLOR_CYAN, COLOR_GREEN,
COLOR_MAGENTA, COLOR_RED, COLOR_BLUE, COLOR_BLACK, COLOR_BLACK }
Expand Down Expand Up @@ -926,7 +926,7 @@ static void vivi_unlock(struct vb2_queue *vq)
}


static struct vb2_ops vivi_video_qops = {
static const struct vb2_ops vivi_video_qops = {
.queue_setup = queue_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
Expand Down Expand Up @@ -957,7 +957,7 @@ static int vidioc_querycap(struct file *file, void *priv,
static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{
struct vivi_fmt *fmt;
const struct vivi_fmt *fmt;

if (f->index >= ARRAY_SIZE(formats))
return -EINVAL;
Expand Down Expand Up @@ -993,7 +993,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct vivi_dev *dev = video_drvdata(file);
struct vivi_fmt *fmt;
const struct vivi_fmt *fmt;

fmt = get_format(f);
if (!fmt) {
Expand Down Expand Up @@ -1102,7 +1102,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
static int vidioc_enum_frameintervals(struct file *file, void *priv,
struct v4l2_frmivalenum *fival)
{
struct vivi_fmt *fmt;
const struct vivi_fmt *fmt;

if (fival->index)
return -EINVAL;
Expand Down Expand Up @@ -1330,7 +1330,7 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};

static struct video_device vivi_template = {
static const struct video_device vivi_template = {
.name = "vivi",
.fops = &vivi_fops,
.ioctl_ops = &vivi_ioctl_ops,
Expand Down

0 comments on commit eea8495

Please sign in to comment.