Commit 245ba61e authored by Linus Torvalds's avatar Linus Torvalds

Automerge

parents d23e4b81 27338050
......@@ -121,7 +121,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
return 0;
}
static int pcm20_ioctl(struct inode *inode, struct file *file,
static int pcm20_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -210,6 +210,12 @@ static int pcm20_ioctl(struct inode *inode, struct file *file,
}
}
static int pcm20_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, pcm20_do_ioctl);
}
static struct pcm20_device pcm20_unit = {
freq: 87*16000,
muted: 1,
......@@ -220,7 +226,7 @@ static struct file_operations pcm20_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: pcm20_ioctl,
llseek: no_llseek,
};
......@@ -230,7 +236,6 @@ static struct video_device pcm20_radio = {
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_RTRACK,
fops: &pcm20_fops,
kernel_ioctl: pcm20_ioctl,
priv: &pcm20_unit
};
......
......@@ -213,7 +213,7 @@ static int rt_getsigstr(struct rt_device *dev)
return 1; /* signal present */
}
static int rt_ioctl(struct inode *inode, struct file *file,
static int rt_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -291,13 +291,19 @@ static int rt_ioctl(struct inode *inode, struct file *file,
}
}
static int rt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, rt_do_ioctl);
}
static struct rt_device rtrack_unit;
static struct file_operations rtrack_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: rt_ioctl,
llseek: no_llseek,
};
......@@ -308,7 +314,6 @@ static struct video_device rtrack_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_RTRACK,
fops: &rtrack_fops,
kernel_ioctl: rt_ioctl,
};
static int __init rtrack_init(void)
......
......@@ -157,7 +157,7 @@ static int az_setfreq(struct az_device *dev, unsigned long frequency)
return 0;
}
static int az_ioctl(struct inode *inode, struct file *file,
static int az_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -243,13 +243,19 @@ static int az_ioctl(struct inode *inode, struct file *file,
}
}
static int az_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, az_do_ioctl);
}
static struct az_device aztech_unit;
static struct file_operations aztech_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: az_ioctl,
llseek: no_llseek,
};
......@@ -260,7 +266,6 @@ static struct video_device aztech_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_AZTECH,
fops: &aztech_fops,
kernel_ioctl: az_ioctl,
};
static int __init aztech_init(void)
......
......@@ -384,7 +384,7 @@ static ssize_t cadet_read(struct file *file, char *data,
static int cadet_ioctl(struct inode *inode, struct file *file,
static int cadet_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
switch(cmd)
......@@ -497,6 +497,11 @@ static int cadet_ioctl(struct inode *inode, struct file *file,
}
}
static int cadet_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, cadet_do_ioctl);
}
static int cadet_open(struct inode *inode, struct file *file)
{
......@@ -523,7 +528,7 @@ static struct file_operations cadet_fops = {
open: cadet_open,
release: cadet_release,
read: cadet_read,
ioctl: video_generic_ioctl,
ioctl: cadet_ioctl,
llseek: no_llseek,
};
......@@ -534,7 +539,6 @@ static struct video_device cadet_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_CADET,
fops: &cadet_fops,
kernel_ioctl: cadet_ioctl,
};
static int isapnp_cadet_probe(void)
......
......@@ -177,7 +177,7 @@ static inline unsigned int gemtek_pci_getsignal( struct gemtek_pci_card *card )
return ( inb( card->iobase ) & 0x08 ) ? 0 : 1;
}
static int gemtek_pci_ioctl(struct inode *inode, struct file *file,
static int gemtek_pci_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -272,6 +272,12 @@ static int gemtek_pci_ioctl(struct inode *inode, struct file *file,
}
}
static int gemtek_pci_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, gemtek_pci_do_ioctl);
}
enum {
GEMTEK_PR103
};
......@@ -295,7 +301,7 @@ static struct file_operations gemtek_pci_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: gemtek_pci_ioctl,
llseek: no_llseek,
};
......@@ -305,7 +311,6 @@ static struct video_device vdev_template = {
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_GEMTEK,
fops: &gemtek_pci_fops,
kernel_ioctl: gemtek_pci_ioctl,
};
static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci_device_id *pci_id )
......
......@@ -138,7 +138,7 @@ int gemtek_getsigstr(struct gemtek_device *dev)
return 1; /* signal present */
}
static int gemtek_ioctl(struct inode *inode, struct file *file,
static int gemtek_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -220,13 +220,19 @@ static int gemtek_ioctl(struct inode *inode, struct file *file,
}
}
static int gemtek_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, gemtek_do_ioctl);
}
static struct gemtek_device gemtek_unit;
static struct file_operations gemtek_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: gemtek_ioctl,
llseek: no_llseek,
};
......@@ -237,7 +243,6 @@ static struct video_device gemtek_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_GEMTEK,
fops: &gemtek_fops,
kernel_ioctl: gemtek_ioctl,
};
static int __init gemtek_init(void)
......
......@@ -65,13 +65,13 @@ static int radio_nr = -1;
MODULE_PARM(radio_nr, "i");
static int radio_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg);
unsigned int cmd, unsigned long arg);
static struct file_operations maestro_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: radio_ioctl,
llseek: no_llseek,
};
......@@ -82,7 +82,6 @@ static struct video_device maestro_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_SF16MI,
fops: &maestro_fops,
kernel_ioctl: radio_ioctl,
};
static struct radio_device
......@@ -175,10 +174,12 @@ static void radio_bits_set(struct radio_device *dev, __u32 data)
sleep_125ms();
}
inline static int radio_function(struct video_device *dev,
inline static int radio_function(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
struct radio_device *card=dev->priv;
switch(cmd) {
case VIDIOCGCAP: {
struct video_capability *v = arg;
......@@ -257,13 +258,14 @@ inline static int radio_function(struct video_device *dev,
}
static int radio_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
unsigned int cmd, unsigned long arg)
{
struct video_device *dev = video_devdata(file);
struct radio_device *card=dev->priv;
int ret;
down(&card->lock);
ret = radio_function(dev, cmd, arg);
ret = video_usercopy(inode, file, cmd, arg, radio_function);
up(&card->lock);
return ret;
}
......
......@@ -73,13 +73,13 @@ MODULE_PARM(radio_nr, "i");
static int radio_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg);
unsigned int cmd, unsigned long arg);
static struct file_operations maxiradio_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: radio_ioctl,
llseek: no_llseek,
};
static struct video_device maxiradio_radio =
......@@ -89,7 +89,6 @@ static struct video_device maxiradio_radio =
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_SF16MI,
fops: &maxiradio_fops,
kernel_ioctl: radio_ioctl,
};
static struct radio_device
......@@ -174,9 +173,10 @@ static int get_tune(__u16 io)
}
inline static int radio_function(struct video_device *dev,
inline static int radio_function(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
struct radio_device *card=dev->priv;
switch(cmd) {
......@@ -267,14 +267,14 @@ inline static int radio_function(struct video_device *dev,
}
static int radio_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
unsigned int cmd, unsigned long arg)
{
struct video_device *dev = video_devdata(file);
struct radio_device *card=dev->priv;
int ret;
down(&card->lock);
ret = radio_function(dev, cmd, arg);
ret = video_usercopy(inode, file, cmd, arg, radio_function);
up(&card->lock);
return ret;
}
......
......@@ -106,7 +106,7 @@ static int rt_getsigstr(struct rt_device *dev)
return 1; /* signal present */
}
static int rt_ioctl(struct inode *inode, struct file *file,
static int rt_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -186,13 +186,19 @@ static int rt_ioctl(struct inode *inode, struct file *file,
}
}
static int rt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, rt_do_ioctl);
}
static struct rt_device rtrack2_unit;
static struct file_operations rtrack2_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: rt_ioctl,
llseek: no_llseek,
};
......@@ -203,7 +209,6 @@ static struct video_device rtrack2_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_RTRACK2,
fops: &rtrack2_fops,
kernel_ioctl: rt_ioctl,
};
static int __init rtrack2_init(void)
......
......@@ -132,7 +132,7 @@ static inline int fmi_getsigstr(struct fmi_device *dev)
return (res & 2) ? 0 : 0xFFFF;
}
static int fmi_ioctl(struct inode *inode, struct file *file,
static int fmi_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -230,13 +230,19 @@ static int fmi_ioctl(struct inode *inode, struct file *file,
}
}
static int fmi_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, fmi_do_ioctl);
}
static struct fmi_device fmi_unit;
static struct file_operations fmi_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: fmi_ioctl,
llseek: no_llseek,
};
......@@ -247,7 +253,6 @@ static struct video_device fmi_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_SF16MI,
fops: &fmi_fops,
kernel_ioctl: fmi_ioctl,
};
/* ladis: this is my card. does any other types exist? */
......
......@@ -185,7 +185,7 @@ int tt_getsigstr(struct tt_device *dev) /* TODO */
/* implement the video4linux api */
static int tt_ioctl(struct inode *inode, struct file *file,
static int tt_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -263,13 +263,19 @@ static int tt_ioctl(struct inode *inode, struct file *file,
}
}
static int tt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, tt_do_ioctl);
}
static struct tt_device terratec_unit;
static struct file_operations terratec_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: tt_ioctl,
llseek: no_llseek,
};
......@@ -280,7 +286,6 @@ static struct video_device terratec_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_TERRATEC,
fops: &terratec_fops,
kernel_ioctl: tt_ioctl,
};
static int __init terratec_init(void)
......
......@@ -154,7 +154,7 @@ static void tr_setfreq(unsigned long f)
write_i2c(5, TSA6060T_ADDR, (f << 1) | 1, f >> 7, 0x60 | ((f >> 15) & 1), 0);
}
static int tr_ioctl(struct inode *inode, struct file *file,
static int tr_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
switch(cmd)
......@@ -244,11 +244,17 @@ static int tr_ioctl(struct inode *inode, struct file *file,
}
}
static int tr_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, tr_do_ioctl);
}
static struct file_operations trust_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: tr_ioctl,
llseek: no_llseek,
};
......@@ -259,7 +265,6 @@ static struct video_device trust_radio=
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_TRUST,
fops: &trust_fops,
kernel_ioctl: tr_ioctl,
};
static int __init trust_init(void)
......
......@@ -70,7 +70,7 @@ static void typhoon_mute(struct typhoon_device *dev);
static void typhoon_unmute(struct typhoon_device *dev);
static int typhoon_setvol(struct typhoon_device *dev, int vol);
static int typhoon_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg);
unsigned int cmd, unsigned long arg);
#ifdef CONFIG_RADIO_TYPHOON_PROC_FS
static int typhoon_get_info(char *buf, char **start, off_t offset, int len);
#endif
......@@ -163,7 +163,7 @@ static int typhoon_setvol(struct typhoon_device *dev, int vol)
}
static int typhoon_ioctl(struct inode *inode, struct file *file,
static int typhoon_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -243,6 +243,12 @@ static int typhoon_ioctl(struct inode *inode, struct file *file,
}
}
static int typhoon_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, typhoon_do_ioctl);
}
static struct typhoon_device typhoon_unit =
{
iobase: CONFIG_RADIO_TYPHOON_PORT,
......@@ -254,7 +260,7 @@ static struct file_operations typhoon_fops = {
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: typhoon_ioctl,
llseek: no_llseek,
};
......@@ -265,7 +271,6 @@ static struct video_device typhoon_radio =
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_TYPHOON,
fops: &typhoon_fops,
kernel_ioctl: typhoon_ioctl,
};
#ifdef CONFIG_RADIO_TYPHOON_PROC_FS
......
......@@ -215,7 +215,7 @@ int zol_is_stereo (struct zol_device *dev)
return 0;
}
static int zol_ioctl(struct inode *inode, struct file *file,
static int zol_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
......@@ -309,6 +309,12 @@ static int zol_ioctl(struct inode *inode, struct file *file,
}
}
static int zol_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, zol_do_ioctl);
}
static struct zol_device zoltrix_unit;
static struct file_operations zoltrix_fops =
......@@ -316,7 +322,7 @@ static struct file_operations zoltrix_fops =
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
ioctl: video_generic_ioctl,
ioctl: zol_ioctl,
llseek: no_llseek,
};
......@@ -327,7 +333,6 @@ static struct video_device zoltrix_radio =
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_ZOLTRIX,
fops: &zoltrix_fops,
kernel_ioctl: zol_ioctl,
};
static int __init zoltrix_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment