mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
V4L/DVB (7584): Fix build that occurs when CONFIG_VIDEO_PMS=y and VIDEO_V4L2_COMMON=m
This patch removes zoran checks for VIDEO_V4L2, since this API is always present, when V4L is selected. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
0b9c2b7a41
commit
17de9a4e53
5 changed files with 12 additions and 37 deletions
|
@ -30,7 +30,7 @@ config VIDEO_V4L2_COMMON
|
||||||
depends on (I2C || I2C=n) && VIDEO_DEV
|
depends on (I2C || I2C=n) && VIDEO_DEV
|
||||||
default (I2C || I2C=n) && VIDEO_DEV
|
default (I2C || I2C=n) && VIDEO_DEV
|
||||||
|
|
||||||
config VIDEO_V4L1
|
config VIDEO_ALLOW_V4L1
|
||||||
bool "Enable Video For Linux API 1 (DEPRECATED)"
|
bool "Enable Video For Linux API 1 (DEPRECATED)"
|
||||||
depends on VIDEO_DEV && VIDEO_V4L2_COMMON
|
depends on VIDEO_DEV && VIDEO_V4L2_COMMON
|
||||||
default VIDEO_DEV && VIDEO_V4L2_COMMON
|
default VIDEO_DEV && VIDEO_V4L2_COMMON
|
||||||
|
@ -59,10 +59,15 @@ config VIDEO_V4L1_COMPAT
|
||||||
If you are unsure as to whether this is required, answer Y.
|
If you are unsure as to whether this is required, answer Y.
|
||||||
|
|
||||||
config VIDEO_V4L2
|
config VIDEO_V4L2
|
||||||
bool
|
tristate
|
||||||
depends on VIDEO_DEV && VIDEO_V4L2_COMMON
|
depends on VIDEO_DEV && VIDEO_V4L2_COMMON
|
||||||
default VIDEO_DEV && VIDEO_V4L2_COMMON
|
default VIDEO_DEV && VIDEO_V4L2_COMMON
|
||||||
|
|
||||||
|
config VIDEO_V4L1
|
||||||
|
tristate
|
||||||
|
depends on VIDEO_DEV && VIDEO_V4L2_COMMON && VIDEO_ALLOW_V4L1
|
||||||
|
default VIDEO_DEV && VIDEO_V4L2_COMMON && VIDEO_ALLOW_V4L1
|
||||||
|
|
||||||
source "drivers/media/video/Kconfig"
|
source "drivers/media/video/Kconfig"
|
||||||
|
|
||||||
source "drivers/media/radio/Kconfig"
|
source "drivers/media/radio/Kconfig"
|
||||||
|
|
|
@ -366,7 +366,7 @@ int msp_sleep(struct msp_state *state, int timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
#ifdef CONFIG_VIDEO_V4L1
|
#ifdef CONFIG_VIDEO_ALLOW_V4L1
|
||||||
static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode)
|
static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode)
|
||||||
{
|
{
|
||||||
if (rxsubchans == V4L2_TUNER_SUB_MONO)
|
if (rxsubchans == V4L2_TUNER_SUB_MONO)
|
||||||
|
@ -514,7 +514,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||||
/* --- v4l ioctls --- */
|
/* --- v4l ioctls --- */
|
||||||
/* take care: bttv does userspace copying, we'll get a
|
/* take care: bttv does userspace copying, we'll get a
|
||||||
kernel pointer here... */
|
kernel pointer here... */
|
||||||
#ifdef CONFIG_VIDEO_V4L1
|
#ifdef CONFIG_VIDEO_ALLOW_V4L1
|
||||||
case VIDIOCGAUDIO:
|
case VIDIOCGAUDIO:
|
||||||
{
|
{
|
||||||
struct video_audio *va = arg;
|
struct video_audio *va = arg;
|
||||||
|
|
|
@ -758,7 +758,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||||
if (analog_ops->standby)
|
if (analog_ops->standby)
|
||||||
analog_ops->standby(&t->fe);
|
analog_ops->standby(&t->fe);
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_VIDEO_V4L1
|
#ifdef CONFIG_VIDEO_ALLOW_V4L1
|
||||||
case VIDIOCSAUDIO:
|
case VIDIOCSAUDIO:
|
||||||
if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
|
if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -243,10 +243,8 @@ struct zoran_format {
|
||||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||||
int palette;
|
int palette;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_VIDEO_V4L2
|
|
||||||
__u32 fourcc;
|
__u32 fourcc;
|
||||||
int colorspace;
|
int colorspace;
|
||||||
#endif
|
|
||||||
int depth;
|
int depth;
|
||||||
__u32 flags;
|
__u32 flags;
|
||||||
__u32 vfespfr;
|
__u32 vfespfr;
|
||||||
|
@ -271,20 +269,6 @@ struct zoran_v4l_settings {
|
||||||
const struct zoran_format *format; /* capture format */
|
const struct zoran_format *format; /* capture format */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* whoops, this one is undeclared if !v4l2 */
|
|
||||||
#ifndef CONFIG_VIDEO_V4L2
|
|
||||||
struct v4l2_jpegcompression {
|
|
||||||
int quality;
|
|
||||||
int APPn;
|
|
||||||
int APP_len;
|
|
||||||
char APP_data[60];
|
|
||||||
int COM_len;
|
|
||||||
char COM_data[60];
|
|
||||||
__u32 jpeg_markers;
|
|
||||||
__u8 reserved[116];
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* jpg-capture/-playback settings */
|
/* jpg-capture/-playback settings */
|
||||||
struct zoran_jpg_settings {
|
struct zoran_jpg_settings {
|
||||||
int decimation; /* this bit is used to set everything to default */
|
int decimation; /* this bit is used to set everything to default */
|
||||||
|
|
|
@ -85,7 +85,6 @@
|
||||||
#include "zoran_device.h"
|
#include "zoran_device.h"
|
||||||
#include "zoran_card.h"
|
#include "zoran_card.h"
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_V4L2
|
|
||||||
/* we declare some card type definitions here, they mean
|
/* we declare some card type definitions here, they mean
|
||||||
* the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */
|
* the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */
|
||||||
#define ZORAN_V4L2_VID_FLAGS ( \
|
#define ZORAN_V4L2_VID_FLAGS ( \
|
||||||
|
@ -94,19 +93,15 @@
|
||||||
V4L2_CAP_VIDEO_OUTPUT |\
|
V4L2_CAP_VIDEO_OUTPUT |\
|
||||||
V4L2_CAP_VIDEO_OVERLAY \
|
V4L2_CAP_VIDEO_OVERLAY \
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
|
|
||||||
#if defined(CONFIG_VIDEO_V4L2) && defined(CONFIG_VIDEO_V4L1_COMPAT)
|
#if defined(CONFIG_VIDEO_V4L1_COMPAT)
|
||||||
#define ZFMT(pal, fcc, cs) \
|
#define ZFMT(pal, fcc, cs) \
|
||||||
.palette = (pal), .fourcc = (fcc), .colorspace = (cs)
|
.palette = (pal), .fourcc = (fcc), .colorspace = (cs)
|
||||||
#elif defined(CONFIG_VIDEO_V4L2)
|
|
||||||
#define ZFMT(pal, fcc, cs) \
|
|
||||||
.fourcc = (fcc), .colorspace = (cs)
|
|
||||||
#else
|
#else
|
||||||
#define ZFMT(pal, fcc, cs) \
|
#define ZFMT(pal, fcc, cs) \
|
||||||
.palette = (pal)
|
.fourcc = (fcc), .colorspace = (cs)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const struct zoran_format zoran_formats[] = {
|
const struct zoran_format zoran_formats[] = {
|
||||||
|
@ -209,7 +204,6 @@ static int lock_norm; /* 0 = default 1 = Don't change TV standard (norm) */
|
||||||
module_param(lock_norm, int, 0644);
|
module_param(lock_norm, int, 0644);
|
||||||
MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)");
|
MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)");
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_V4L2
|
|
||||||
/* small helper function for calculating buffersizes for v4l2
|
/* small helper function for calculating buffersizes for v4l2
|
||||||
* we calculate the nearest higher power-of-two, which
|
* we calculate the nearest higher power-of-two, which
|
||||||
* will be the recommended buffersize */
|
* will be the recommended buffersize */
|
||||||
|
@ -232,7 +226,6 @@ zoran_v4l2_calc_bufsize (struct zoran_jpg_settings *settings)
|
||||||
return 8192;
|
return 8192;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* forward references */
|
/* forward references */
|
||||||
static void v4l_fbuffer_free(struct file *file);
|
static void v4l_fbuffer_free(struct file *file);
|
||||||
|
@ -1709,7 +1702,6 @@ setup_overlay (struct file *file,
|
||||||
return wait_grab_pending(zr);
|
return wait_grab_pending(zr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_V4L2
|
|
||||||
/* get the status of a buffer in the clients buffer queue */
|
/* get the status of a buffer in the clients buffer queue */
|
||||||
static int
|
static int
|
||||||
zoran_v4l2_buffer_status (struct file *file,
|
zoran_v4l2_buffer_status (struct file *file,
|
||||||
|
@ -1815,7 +1807,6 @@ zoran_v4l2_buffer_status (struct file *file,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zoran_set_norm (struct zoran *zr,
|
zoran_set_norm (struct zoran *zr,
|
||||||
|
@ -2624,8 +2615,6 @@ zoran_do_ioctl (struct inode *inode,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_V4L2
|
|
||||||
|
|
||||||
/* The new video4linux2 capture interface - much nicer than video4linux1, since
|
/* The new video4linux2 capture interface - much nicer than video4linux1, since
|
||||||
* it allows for integrating the JPEG capturing calls inside standard v4l2
|
* it allows for integrating the JPEG capturing calls inside standard v4l2
|
||||||
*/
|
*/
|
||||||
|
@ -4197,7 +4186,6 @@ zoran_do_ioctl (struct inode *inode,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
dprintk(1, KERN_DEBUG "%s: UNKNOWN ioctl cmd: 0x%x\n",
|
dprintk(1, KERN_DEBUG "%s: UNKNOWN ioctl cmd: 0x%x\n",
|
||||||
|
@ -4657,9 +4645,7 @@ static const struct file_operations zoran_fops = {
|
||||||
struct video_device zoran_template __devinitdata = {
|
struct video_device zoran_template __devinitdata = {
|
||||||
.name = ZORAN_NAME,
|
.name = ZORAN_NAME,
|
||||||
.type = ZORAN_VID_TYPE,
|
.type = ZORAN_VID_TYPE,
|
||||||
#ifdef CONFIG_VIDEO_V4L2
|
|
||||||
.type2 = ZORAN_V4L2_VID_FLAGS,
|
.type2 = ZORAN_V4L2_VID_FLAGS,
|
||||||
#endif
|
|
||||||
.fops = &zoran_fops,
|
.fops = &zoran_fops,
|
||||||
.release = &zoran_vdev_release,
|
.release = &zoran_vdev_release,
|
||||||
.minor = -1
|
.minor = -1
|
||||||
|
|
Loading…
Add table
Reference in a new issue