Commit f60a0a79 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (34 commits)
  V4L/DVB (10173): Missing v4l2_prio_close in radio_release
  V4L/DVB (10172): add DVB_DEVICE_TYPE= to uevent
  V4L/DVB (10171): Use usb_set_intfdata
  V4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error
  V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
  V4L/DVB (10167): sms1xxx: add support for inverted gpio
  V4L/DVB (10166): dvb frontend: stop using non-C99 compliant comments
  V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2
  V4L/DVB (10164): Add missing S2 caps flag to S2API
  V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
  V4L/DVB (10162): tuner-simple: Fix tuner type set message
  V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus
  V4L/DVB (10160): em28xx: update chip id for em2710
  V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme
  V4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus
  V4L/DVB (10155): Add TEA5764 radio driver
  V4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board
  V4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.
  V4L/DVB (10152): Change configuration of the Beholder H6 card
  V4L/DVB (10151): Fix I2C bridge error in zl10353
  ...
parents 2f983570 b15dd79e
......@@ -152,3 +152,4 @@
151 -> ADS Tech Instant HDTV [1421:0380]
152 -> Asus Tiger Rev:1.00 [1043:4857]
153 -> Kworld Plus TV Analog Lite PCI [17de:7128]
154 -> Avermedia AVerTV GO 007 FM Plus [1461:f31d]
......@@ -41,6 +41,7 @@ chips are known to work:
- 10c4:818a: Silicon Labs USB FM Radio Reference Design
- 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF)
- 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700)
- 10c5:819a: DealExtreme USB Radio
Software
......
......@@ -184,7 +184,7 @@ may be NULL if the subdev driver does not support anything from that category.
It looks like this:
struct v4l2_subdev_core_ops {
int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip);
int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip);
int (*log_status)(struct v4l2_subdev *sd);
int (*init)(struct v4l2_subdev *sd, u32 val);
...
......@@ -390,16 +390,18 @@ allocated memory.
You should also set these fields:
- parent: set to the parent device (same device as was used to register
v4l2_device).
- v4l2_dev: set to the v4l2_device parent device.
- name: set to something descriptive and unique.
- fops: set to the file_operations struct.
- fops: set to the v4l2_file_operations struct.
- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
(highly recommended to use this and it might become compulsory in the
future!), then set this to your v4l2_ioctl_ops struct.
If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to
__video_ioctl2 or .ioctl to video_ioctl2 in your file_operations struct.
If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or
.ioctl to video_ioctl2 in your v4l2_file_operations struct.
The v4l2_file_operations struct is a subset of file_operations. The main
difference is that the inode argument is omitted since it is never used.
video_device registration
......@@ -410,7 +412,7 @@ for you.
err = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
if (err) {
video_device_release(vdev); // or kfree(my_vdev);
video_device_release(vdev); /* or kfree(my_vdev); */
return err;
}
......@@ -516,5 +518,4 @@ void *video_drvdata(struct file *file);
You can go from a video_device struct to the v4l2_device struct using:
struct v4l2_device *v4l2_dev = dev_get_drvdata(vdev->parent);
struct v4l2_device *v4l2_dev = vdev->v4l2_dev;
......@@ -192,9 +192,9 @@ void saa7146_buffer_timeout(unsigned long data)
/********************************************************************************/
/* file operations */
static int fops_open(struct inode *inode, struct file *file)
static int fops_open(struct file *file)
{
unsigned int minor = iminor(inode);
unsigned int minor = video_devdata(file)->minor;
struct saa7146_dev *h = NULL, *dev = NULL;
struct list_head *list;
struct saa7146_fh *fh = NULL;
......@@ -202,7 +202,7 @@ static int fops_open(struct inode *inode, struct file *file)
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
DEB_EE(("inode:%p, file:%p, minor:%d\n",inode,file,minor));
DEB_EE(("file:%p, minor:%d\n", file, minor));
if (mutex_lock_interruptible(&saa7146_devices_lock))
return -ERESTARTSYS;
......@@ -255,7 +255,7 @@ static int fops_open(struct inode *inode, struct file *file)
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
result = saa7146_vbi_uops.open(dev,file);
if (dev->ext_vv_data->vbi_fops.open)
dev->ext_vv_data->vbi_fops.open(inode, file);
dev->ext_vv_data->vbi_fops.open(file);
} else {
DEB_S(("initializing video...\n"));
result = saa7146_video_uops.open(dev,file);
......@@ -280,12 +280,12 @@ static int fops_open(struct inode *inode, struct file *file)
return result;
}
static int fops_release(struct inode *inode, struct file *file)
static int fops_release(struct file *file)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
DEB_EE(("inode:%p, file:%p\n",inode,file));
DEB_EE(("file:%p\n", file));
if (mutex_lock_interruptible(&saa7146_devices_lock))
return -ERESTARTSYS;
......@@ -294,7 +294,7 @@ static int fops_release(struct inode *inode, struct file *file)
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
saa7146_vbi_uops.release(dev,file);
if (dev->ext_vv_data->vbi_fops.release)
dev->ext_vv_data->vbi_fops.release(inode, file);
dev->ext_vv_data->vbi_fops.release(file);
} else {
saa7146_video_uops.release(dev,file);
}
......@@ -308,10 +308,10 @@ static int fops_release(struct inode *inode, struct file *file)
return 0;
}
static int fops_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
static long fops_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
/*
DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg));
DEB_EE(("file:%p, cmd:%d, arg:%li\n", file, cmd, arg));
*/
return video_usercopy(file, cmd, arg, saa7146_video_do_ioctl);
}
......@@ -416,7 +416,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou
}
}
static const struct file_operations video_fops =
static const struct v4l2_file_operations video_fops =
{
.owner = THIS_MODULE,
.open = fops_open,
......@@ -426,7 +426,6 @@ static const struct file_operations video_fops =
.poll = fops_poll,
.mmap = fops_mmap,
.ioctl = fops_ioctl,
.llseek = no_llseek,
};
static void vv_callback(struct saa7146_dev *dev, unsigned long status)
......
......@@ -834,13 +834,14 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
* copying is done already, arg is a kernel pointer.
*/
int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
long saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
int err = 0, result = 0, ee = 0;
long err = 0;
int result = 0, ee = 0;
struct saa7146_use_ops *ops;
struct videobuf_queue *q;
......
......@@ -820,6 +820,15 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
int ret;
unsigned frequency = params->frequency / 62500;
if (!tun->stepsize) {
/* tuner-core was loaded before the digital tuner was
* configured and somehow picked the wrong tuner type */
tuner_err("attempt to treat tuner %d (%s) as digital tuner "
"without stepsize defined.\n",
priv->type, priv->tun->name);
return 0; /* failure */
}
t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL);
ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb);
if (ret < 0)
......@@ -1059,7 +1068,12 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
memcpy(&fe->ops.tuner_ops, &simple_tuner_ops,
sizeof(struct dvb_tuner_ops));
tuner_info("type set to %d (%s)\n", type, priv->tun->name);
if (type != priv->type)
tuner_warn("couldn't set type to %d. Using %d (%s) instead\n",
type, priv->type, priv->tun->name);
else
tuner_info("type set to %d (%s)\n",
priv->type, priv->tun->name);
if ((debug) || ((atv_input[priv->nr] > 0) ||
(dtv_input[priv->nr] > 0))) {
......
......@@ -436,8 +436,9 @@ static int dvb_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct dvb_device *dvbdev = dev_get_drvdata(dev);
add_uevent_var(env, "DVB_DEVICE_NUM=%d", dvbdev->id);
add_uevent_var(env, "DVB_ADAPTER_NUM=%d", dvbdev->adapter->num);
add_uevent_var(env, "DVB_DEVICE_TYPE=%s", dnames[dvbdev->type]);
add_uevent_var(env, "DVB_DEVICE_NUM=%d", dvbdev->id);
return 0;
}
......
......@@ -187,7 +187,7 @@ int gp8psk_bcm4500_reload(struct dvb_usb_device *d)
/* load BCM4500 firmware */
if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM)
if (gp8psk_load_bcm4500fw(d))
return EINVAL;
return -EINVAL;
return 0;
}
......
......@@ -1463,6 +1463,7 @@ static struct dvb_frontend_ops cx24116_ops = {
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
FE_CAN_2G_MODULATION |
FE_CAN_QPSK | FE_CAN_RECOVER
},
......
......@@ -37,7 +37,8 @@ struct cx24116_config {
u8 mpg_clk_pos_pol:0x02;
};
#if defined(CONFIG_DVB_CX24116) || defined(CONFIG_DVB_CX24116_MODULE)
#if defined(CONFIG_DVB_CX24116) || \
(defined(CONFIG_DVB_CX24116_MODULE) && defined(MODULE))
extern struct dvb_frontend *cx24116_attach(
const struct cx24116_config *config,
struct i2c_adapter *i2c);
......
......@@ -1618,6 +1618,7 @@ static struct dvb_frontend_ops stb0899_ops = {
.caps = FE_CAN_INVERSION_AUTO |
FE_CAN_FEC_AUTO |
FE_CAN_2G_MODULATION |
FE_CAN_QPSK
},
......
......@@ -587,8 +587,15 @@ static int zl10353_init(struct dvb_frontend *fe)
static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
{
struct zl10353_state *state = fe->demodulator_priv;
u8 val = 0x0a;
if (state->config.no_tuner) {
/* No tuner attached to the internal I2C bus */
/* If set enable I2C bridge, the main I2C bus stopped hardly */
return 0;
}
if (enable)
val |= 0x10;
......
......@@ -120,7 +120,7 @@ static struct sms_board sms_boards[] = {
.name = "Hauppauge WinTV MiniCard",
.type = SMS_NOVA_B0,
.fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
.lna_ctrl = 1,
.lna_ctrl = -1,
},
};
......@@ -131,9 +131,10 @@ struct sms_board *sms_get_board(int id)
return &sms_boards[id];
}
static int sms_set_gpio(struct smscore_device_t *coredev, u32 pin, int enable)
static int sms_set_gpio(struct smscore_device_t *coredev, int pin, int enable)
{
int ret;
int lvl, ret;
u32 gpio;
struct smscore_gpio_config gpioconfig = {
.direction = SMS_GPIO_DIRECTION_OUTPUT,
.pullupdown = SMS_GPIO_PULLUPDOWN_NONE,
......@@ -145,12 +146,20 @@ static int sms_set_gpio(struct smscore_device_t *coredev, u32 pin, int enable)
if (pin == 0)
return -EINVAL;
ret = smscore_configure_gpio(coredev, pin, &gpioconfig);
if (pin < 0) {
/* inverted gpio */
gpio = pin * -1;
lvl = enable ? 0 : 1;
} else {
gpio = pin;
lvl = enable ? 1 : 0;
}
ret = smscore_configure_gpio(coredev, gpio, &gpioconfig);
if (ret < 0)
return ret;
return smscore_set_gpio(coredev, pin, enable);
return smscore_set_gpio(coredev, gpio, lvl);
}
int sms_board_setup(struct smscore_device_t *coredev)
......
......@@ -316,7 +316,7 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh)
return 0;
}
static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
static long av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct saa7146_dev *dev = fh->dev;
struct av7110 *av7110 = (struct av7110*) dev->ext_priv;
......@@ -567,7 +567,7 @@ static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
return 0;
}
static int av7110_vbi_reset(struct inode *inode, struct file *file)
static int av7110_vbi_reset(struct file *file)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
......
......@@ -1493,7 +1493,7 @@ static struct saa7146_extension_ioctls ioctls[] = {
{0, 0}
};
static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
static long av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct saa7146_dev *dev = fh->dev;
struct budget_av *budget_av = (struct budget_av *) dev->ext_priv;
......
config DVB_TTUSB_BUDGET
tristate "Technotrend/Hauppauge Nova-USB devices"
depends on DVB_CORE && USB && I2C
depends on DVB_CORE && USB && I2C && PCI
select DVB_CX22700 if !DVB_FE_CUSTOMISE
select DVB_TDA1004X if !DVB_FE_CUSTOMISE
select DVB_VES1820 if !DVB_FE_CUSTOMISE
......
config DVB_TTUSB_DEC
tristate "Technotrend/Hauppauge USB DEC devices"
depends on DVB_CORE && USB && INPUT
depends on DVB_CORE && USB && INPUT && PCI
select CRC32
help
Support for external USB adapters designed by Technotrend and
......
......@@ -387,4 +387,23 @@ config USB_MR800
To compile this driver as a module, choose M here: the
module will be called radio-mr800.
config RADIO_TEA5764
tristate "TEA5764 I2C FM radio support"
depends on I2C && VIDEO_V4L2
---help---
Say Y here if you want to use the TEA5764 FM chip found in
EZX phones. This FM chip is present in EZX phones from Motorola,
connected to internal pxa I2C bus.
To compile this driver as a module, choose M here: the
module will be called radio-tea5764.
config RADIO_TEA5764_XTAL
bool "TEA5764 crystal reference"
depends on RADIO_TEA5764=y
default y
help
Say Y here if TEA5764 have a 32768 Hz crystal in circuit, say N
here if TEA5764 reference frequency is connected in FREQIN.
endif # RADIO_ADAPTERS
......@@ -19,5 +19,6 @@ obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o
obj-$(CONFIG_USB_DSBR) += dsbr100.o
obj-$(CONFIG_USB_SI470X) += radio-si470x.o
obj-$(CONFIG_USB_MR800) += radio-mr800.o
obj-$(CONFIG_RADIO_TEA5764) += radio-tea5764.o
EXTRA_CFLAGS += -Isound
......@@ -154,8 +154,8 @@ devices, that would be 76 and 91. */
static int usb_dsbr100_probe(struct usb_interface *intf,
const struct usb_device_id *id);
static void usb_dsbr100_disconnect(struct usb_interface *intf);
static int usb_dsbr100_open(struct inode *inode, struct file *file);
static int usb_dsbr100_close(struct inode *inode, struct file *file);
static int usb_dsbr100_open(struct file *file);
static int usb_dsbr100_close(struct file *file);
static int usb_dsbr100_suspend(struct usb_interface *intf,
pm_message_t message);
static int usb_dsbr100_resume(struct usb_interface *intf);
......@@ -566,7 +566,7 @@ static int vidioc_s_audio(struct file *file, void *priv,
return 0;
}
static int usb_dsbr100_open(struct inode *inode, struct file *file)
static int usb_dsbr100_open(struct file *file)
{
struct dsbr100_device *radio = video_drvdata(file);
int retval;
......@@ -593,7 +593,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
return 0;
}
static int usb_dsbr100_close(struct inode *inode, struct file *file)
static int usb_dsbr100_close(struct file *file)
{
struct dsbr100_device *radio = video_drvdata(file);
int retval;
......@@ -653,15 +653,11 @@ static void usb_dsbr100_video_device_release(struct video_device *videodev)
}
/* File system interface */
static const struct file_operations usb_dsbr100_fops = {
static const struct v4l2_file_operations usb_dsbr100_fops = {
.owner = THIS_MODULE,
.open = usb_dsbr100_open,
.release = usb_dsbr100_close,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
......
......@@ -374,26 +374,22 @@ static int vidioc_s_audio(struct file *file, void *priv,
static struct rt_device rtrack_unit;
static int rtrack_exclusive_open(struct inode *inode, struct file *file)
static int rtrack_exclusive_open(struct file *file)
{
return test_and_set_bit(0, &rtrack_unit.in_use) ? -EBUSY : 0;
}
static int rtrack_exclusive_release(struct inode *inode, struct file *file)
static int rtrack_exclusive_release(struct file *file)
{
clear_bit(0, &rtrack_unit.in_use);
return 0;
}
static const struct file_operations rtrack_fops = {
static const struct v4l2_file_operations rtrack_fops = {
.owner = THIS_MODULE,
.open = rtrack_exclusive_open,
.release = rtrack_exclusive_release,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
static const struct v4l2_ioctl_ops rtrack_ioctl_ops = {
......
......@@ -338,26 +338,22 @@ static int vidioc_s_ctrl (struct file *file, void *priv,
static struct az_device aztech_unit;
static int aztech_exclusive_open(struct inode *inode, struct file *file)
static int aztech_exclusive_open(struct file *file)
{
return test_and_set_bit(0, &aztech_unit.in_use) ? -EBUSY : 0;
}
static int aztech_exclusive_release(struct inode *inode, struct file *file)
static int aztech_exclusive_release(struct file *file)
{
clear_bit(0, &aztech_unit.in_use);
return 0;
}
static const struct file_operations aztech_fops = {
static const struct v4l2_file_operations aztech_fops = {
.owner = THIS_MODULE,
.open = aztech_exclusive_open,
.release = aztech_exclusive_release,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
static const struct v4l2_ioctl_ops aztech_ioctl_ops = {
......
......@@ -529,7 +529,7 @@ static int vidioc_s_audio(struct file *file, void *priv,
}
static int
cadet_open(struct inode *inode, struct file *file)
cadet_open(struct file *file)
{
users++;
if (1 == users) init_waitqueue_head(&read_queue);
......@@ -537,7 +537,7 @@ cadet_open(struct inode *inode, struct file *file)
}
static int
cadet_release(struct inode *inode, struct file *file)
cadet_release(struct file *file)
{
users--;
if (0 == users){
......@@ -557,17 +557,13 @@ cadet_poll(struct file *file, struct poll_table_struct *wait)
}
static const struct file_operations cadet_fops = {
static const struct v4l2_file_operations cadet_fops = {
.owner = THIS_MODULE,
.open = cadet_open,
.release = cadet_release,
.read = cadet_read,
.ioctl = video_ioctl2,
.poll = cadet_poll,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
static const struct v4l2_ioctl_ops cadet_ioctl_ops = {
......
......@@ -358,26 +358,22 @@ MODULE_DEVICE_TABLE( pci, gemtek_pci_id );
static int mx = 1;
static int gemtek_pci_exclusive_open(struct inode *inode, struct file *file)
static int gemtek_pci_exclusive_open(struct file *file)
{
return test_and_set_bit(0, &in_use) ? -EBUSY : 0;
}
static int gemtek_pci_exclusive_release(struct inode *inode, struct file *file)
static int gemtek_pci_exclusive_release(struct file *file)
{
clear_bit(0, &in_use);
return 0;
}
static const struct file_operations gemtek_pci_fops = {
static const struct v4l2_file_operations gemtek_pci_fops = {
.owner = THIS_MODULE,
.open = gemtek_pci_exclusive_open,
.release = gemtek_pci_exclusive_release,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = {
......
......@@ -394,26 +394,22 @@ static struct v4l2_queryctrl radio_qctrl[] = {
}
};
static int gemtek_exclusive_open(struct inode *inode, struct file *file)
static int gemtek_exclusive_open(struct file *file)
{
return test_and_set_bit(0, &in_use) ? -EBUSY : 0;
}
static int gemtek_exclusive_release(struct inode *inode, struct file *file)
static int gemtek_exclusive_release(struct file *file)
{
clear_bit(0, &in_use);
return 0;
}
static const struct file_operations gemtek_fops = {
static const struct v4l2_file_operations gemtek_fops = {
.owner = THIS_MODULE,
.open = gemtek_exclusive_open,
.release = gemtek_exclusive_release,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek
};
static int vidioc_querycap(struct file *file, void *priv,
......
......@@ -79,12 +79,12 @@ static unsigned long in_use;
static int maestro_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static int maestro_exclusive_open(struct inode *inode, struct file *file)
static int maestro_exclusive_open(struct file *file)
{
return test_and_set_bit(0, &in_use) ? -EBUSY : 0;
}
static int maestro_exclusive_release(struct inode *inode, struct file *file)
static int maestro_exclusive_release(struct file *file)
{
clear_bit(0, &in_use);
return 0;
......@@ -110,15 +110,11 @@ static struct pci_driver maestro_r_driver = {
.remove = __devexit_p(maestro_remove),
};
static const struct file_operations maestro_fops = {
static const struct v4l2_file_operations maestro_fops = {
.owner = THIS_MODULE,
.open = maestro_exclusive_open,
.release = maestro_exclusive_release,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
struct radio_device {
......
......@@ -100,26 +100,22 @@ static unsigned long in_use;
#define BITS2FREQ(x) ((x) * FREQ_STEP - FREQ_IF)
static int maxiradio_exclusive_open(struct inode *inode, struct file *file)
static int maxiradio_exclusive_open(struct file *file)
{
return test_and_set_bit(0, &in_use) ? -EBUSY : 0;
}
static int maxiradio_exclusive_release(struct inode *inode, struct file *file)
static int maxiradio_exclusive_release(struct file *file)
{
clear_bit(0, &in_use);
return 0;
}
static const struct file_operations maxiradio_fops = {
static const struct v4l2_file_operations maxiradio_fops = {
.owner = THIS_MODULE,
.open = maxiradio_exclusive_open,
.release = maxiradio_exclusive_release,
.ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek,
};
static struct radio_device
......
......@@ -127,8 +127,8 @@ static struct v4l2_queryctrl radio_qctrl[] = {