Skip to content

Commit 36c0f8b

Browse files
Hans Verkuilmchehab
authored andcommitted
[media] vb2: replace void *alloc_ctxs by struct device *alloc_devs
Make this a proper typed array. Drop the old allocate context code since that is no longer used. Note that the memops functions now get a struct device pointer instead of the struct device ** that was there initially (actually a void pointer to a struct containing only a struct device pointer). This code is now a lot cleaner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
1 parent 2548fee commit 36c0f8b

88 files changed

Lines changed: 128 additions & 208 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎drivers/input/touchscreen/sur40.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ static void sur40_disconnect(struct usb_interface *interface)
645645
*/
646646
static int sur40_queue_setup(struct vb2_queue *q,
647647
unsigned int *nbuffers, unsigned int *nplanes,
648-
unsigned int sizes[], void *alloc_ctxs[])
648+
unsigned int sizes[], struct device *alloc_devs[])
649649
{
650650
if (q->num_buffers + *nbuffers < 3)
651651
*nbuffers = 3 - q->num_buffers;

‎drivers/media/dvb-frontends/rtl2832_sdr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static int rtl2832_sdr_querycap(struct file *file, void *fh,
452452
/* Videobuf2 operations */
453453
static int rtl2832_sdr_queue_setup(struct vb2_queue *vq,
454454
unsigned int *nbuffers,
455-
unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[])
455+
unsigned int *nplanes, unsigned int sizes[], struct device *alloc_devs[])
456456
{
457457
struct rtl2832_sdr_dev *dev = vb2_get_drv_priv(vq);
458458
struct platform_device *pdev = dev->pdev;

‎drivers/media/pci/cobalt/cobalt-v4l2.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static const struct v4l2_dv_timings cea1080p60 = V4L2_DV_BT_CEA_1920X1080P60;
4545

4646
static int cobalt_queue_setup(struct vb2_queue *q,
4747
unsigned int *num_buffers, unsigned int *num_planes,
48-
unsigned int sizes[], void *alloc_ctxs[])
48+
unsigned int sizes[], struct device *alloc_devs[])
4949
{
5050
struct cobalt_stream *s = q->drv_priv;
5151
unsigned size = s->stride * s->height;

‎drivers/media/pci/cx23885/cx23885-417.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev, int startencoder)
11401140

11411141
static int queue_setup(struct vb2_queue *q,
11421142
unsigned int *num_buffers, unsigned int *num_planes,
1143-
unsigned int sizes[], void *alloc_ctxs[])
1143+
unsigned int sizes[], struct device *alloc_devs[])
11441144
{
11451145
struct cx23885_dev *dev = q->drv_priv;
11461146

‎drivers/media/pci/cx23885/cx23885-dvb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
9494

9595
static int queue_setup(struct vb2_queue *q,
9696
unsigned int *num_buffers, unsigned int *num_planes,
97-
unsigned int sizes[], void *alloc_ctxs[])
97+
unsigned int sizes[], struct device *alloc_devs[])
9898
{
9999
struct cx23885_tsport *port = q->drv_priv;
100100

‎drivers/media/pci/cx23885/cx23885-vbi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int cx23885_start_vbi_dma(struct cx23885_dev *dev,
122122

123123
static int queue_setup(struct vb2_queue *q,
124124
unsigned int *num_buffers, unsigned int *num_planes,
125-
unsigned int sizes[], void *alloc_ctxs[])
125+
unsigned int sizes[], struct device *alloc_devs[])
126126
{
127127
struct cx23885_dev *dev = q->drv_priv;
128128
unsigned lines = VBI_PAL_LINE_COUNT;

‎drivers/media/pci/cx23885/cx23885-video.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static int cx23885_start_video_dma(struct cx23885_dev *dev,
335335

336336
static int queue_setup(struct vb2_queue *q,
337337
unsigned int *num_buffers, unsigned int *num_planes,
338-
unsigned int sizes[], void *alloc_ctxs[])
338+
unsigned int sizes[], struct device *alloc_devs[])
339339
{
340340
struct cx23885_dev *dev = q->drv_priv;
341341

‎drivers/media/pci/cx25821/cx25821-video.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status)
143143

144144
static int cx25821_queue_setup(struct vb2_queue *q,
145145
unsigned int *num_buffers, unsigned int *num_planes,
146-
unsigned int sizes[], void *alloc_ctxs[])
146+
unsigned int sizes[], struct device *alloc_devs[])
147147
{
148148
struct cx25821_channel *chan = q->drv_priv;
149149
unsigned size = (chan->fmt->depth * chan->width * chan->height) >> 3;

‎drivers/media/pci/cx88/cx88-blackbird.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ static int blackbird_stop_codec(struct cx8802_dev *dev)
639639

640640
static int queue_setup(struct vb2_queue *q,
641641
unsigned int *num_buffers, unsigned int *num_planes,
642-
unsigned int sizes[], void *alloc_ctxs[])
642+
unsigned int sizes[], struct device *alloc_devs[])
643643
{
644644
struct cx8802_dev *dev = q->drv_priv;
645645

‎drivers/media/pci/cx88/cx88-dvb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
8484

8585
static int queue_setup(struct vb2_queue *q,
8686
unsigned int *num_buffers, unsigned int *num_planes,
87-
unsigned int sizes[], void *alloc_ctxs[])
87+
unsigned int sizes[], struct device *alloc_devs[])
8888
{
8989
struct cx8802_dev *dev = q->drv_priv;
9090

0 commit comments

Comments
 (0)