Commit cc864858 authored by Ian Cowan's avatar Ian Cowan Committed by Mauro Carvalho Chehab
Browse files

media: staging: media: zoran: setup videocodec header for debugging macros



This adds inline functions in the videocodec header file to convert the
videocodec and videocodec_master structs to their respective contained
zoran struct. This will be used to pass the zoran struct to the
zrdev_XXX() macros defined in the zoran header.

In the zoran header, the new include is added to ensure all variables
can be completely defined with the zoran and videocodec includes where
they are located.

Signed-off-by: default avatarIan Cowan <ian@linux.cowan.aero>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f3805c32
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -307,4 +307,19 @@ extern int videocodec_unregister(const struct videocodec *);


int videocodec_debugfs_show(struct seq_file *m);
int videocodec_debugfs_show(struct seq_file *m);


#include "zoran.h"
static inline struct zoran *videocodec_master_to_zoran(struct videocodec_master *master)
{
	struct zoran *zr = master->data;

	return zr;
}

static inline struct zoran *videocodec_to_zoran(struct videocodec *codec)
{
	struct videocodec_master *master = codec->master_data;

	return videocodec_master_to_zoran(master);
}

#endif				/*ifndef __LINUX_VIDEOCODEC_H */
#endif				/*ifndef __LINUX_VIDEOCODEC_H */
+1 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@


#include <linux/debugfs.h>
#include <linux/debugfs.h>
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/i2c-algo-bit.h>
#include <media/v4l2-device.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-ctrls.h>
#include <media/videobuf2-core.h>
#include <media/videobuf2-core.h>