u8 fmt, vinctrl;
struct em28xx_v4l2 *v4l2 = dev->v4l2;
- fmt = dev->format->reg;
+ fmt = v4l2->format->reg;
if (!dev->is_em25xx)
fmt |= 0x20;
/*
size = fmt->fmt.pix.sizeimage;
else
size =
- (v4l2->width * v4l2->height * dev->format->depth + 7) >> 3;
+ (v4l2->width * v4l2->height * v4l2->format->depth + 7) >> 3;
if (size == 0)
return -EINVAL;
em28xx_videodbg("%s, field=%d\n", __func__, vb->v4l2_buf.field);
- size = (v4l2->width * v4l2->height * dev->format->depth + 7) >> 3;
+ size = (v4l2->width * v4l2->height * v4l2->format->depth + 7) >> 3;
if (vb2_plane_size(vb, 0) < size) {
em28xx_videodbg("%s data will not fit into plane (%lu < %lu)\n",
f->fmt.pix.width = v4l2->width;
f->fmt.pix.height = v4l2->height;
- f->fmt.pix.pixelformat = dev->format->fourcc;
- f->fmt.pix.bytesperline = (v4l2->width * dev->format->depth + 7) >> 3;
+ f->fmt.pix.pixelformat = v4l2->format->fourcc;
+ f->fmt.pix.bytesperline = (v4l2->width * v4l2->format->depth + 7) >> 3;
f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * v4l2->height;
f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
if (!fmt)
return -EINVAL;
- dev->format = fmt;
+ v4l2->format = fmt;
v4l2->width = width;
v4l2->height = height;
dev->interlaced = EM28XX_INTERLACED_DEFAULT;
/* Analog specific initialization */
- dev->format = &format[0];
+ v4l2->format = &format[0];
maxw = norm_maxw(dev);
/* MaxPacketSize for em2800 is too small to capture at full resolution
u8 vinmode;
u8 vinctl;
+ struct em28xx_fmt *format;
v4l2_std_id norm; /* selected tv norm */
/* Frame properties */
struct work_struct wq_trigger; /* Trigger to start/stop audio for alsa module */
atomic_t stream_started; /* stream should be running if true */
- struct em28xx_fmt *format;
-
/* Some older em28xx chips needs a waiting time after writing */
unsigned int wait_after_write;