Skip to content

Commit

Permalink
V4L (926_2): Moves compat32 functions from fs to v4l subsystem
Browse files Browse the repository at this point in the history
This moves the 32 bit ioctl compatibility handlers for
Video4Linux into a new file and adds explicit calls to them
to each v4l device driver.

Unfortunately, there does not seem to be any code handling
the v4l2 ioctls, so quite often the code goes through two
separate conversions, first from 32 bit v4l to 64 bit v4l,
and from there to 64 bit v4l2. My patch does not change
that, so there is still much room for improvement.

Also, some drivers have additional ioctl numbers, for
which the conversion should be handled internally to
that driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
  • Loading branch information
Arnd Bergmann authored and Mauro Carvalho Chehab committed Jan 9, 2006
1 parent 5367f2d commit 0d0fbf8
Show file tree
Hide file tree
Showing 42 changed files with 362 additions and 273 deletions.
1 change: 1 addition & 0 deletions drivers/media/radio/miropcm20-radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ static struct file_operations pcm20_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = pcm20_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-aimslab.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ static struct file_operations rtrack_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = rt_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-aztech.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ static struct file_operations aztech_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = az_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-cadet.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ static struct file_operations cadet_fops = {
.release = cadet_release,
.read = cadet_read,
.ioctl = cadet_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-gemtek-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ static struct file_operations gemtek_pci_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = gemtek_pci_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-gemtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ static struct file_operations gemtek_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = gemtek_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-maestro.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static struct file_operations maestro_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = radio_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-maxiradio.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ static struct file_operations maxiradio_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = radio_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};
static struct video_device maxiradio_radio =
Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-rtrack2.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ static struct file_operations rtrack2_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = rt_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-sf16fmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ static struct file_operations fmi_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = fmi_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-sf16fmr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ static struct file_operations fmr2_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = fmr2_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-terratec.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ static struct file_operations terratec_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = tt_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-trust.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ static struct file_operations trust_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = tr_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-typhoon.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static struct file_operations typhoon_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = typhoon_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/radio/radio-zoltrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ static struct file_operations zoltrix_fops =
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = zol_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
3 changes: 2 additions & 1 deletion drivers/media/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
zr36067-objs := zoran_procfs.o zoran_device.o \
zoran_driver.o zoran_card.o
tuner-objs := tuner-core.o tuner-simple.o mt20xx.o tda8290.o tea5767.o
obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o

obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o compat_ioctl32.o

obj-$(CONFIG_VIDEO_BT848) += bttv.o msp3400.o tvaudio.o \
tda7432.o tda9875.o ir-kbd-i2c.o ir-kbd-gpio.o
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/arv.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ static struct file_operations ar_fops = {
.release = video_exclusive_release,
.read = ar_read,
.ioctl = ar_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3120,6 +3120,7 @@ static struct file_operations bttv_fops =
.open = bttv_open,
.release = bttv_release,
.ioctl = bttv_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
.read = bttv_read,
.mmap = bttv_mmap,
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/bw-qcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ static struct file_operations qcam_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = qcam_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.read = qcam_read,
.llseek = no_llseek,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/c-qcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ static struct file_operations qcam_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = qcam_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.read = qcam_read,
.llseek = no_llseek,
};
Expand Down
Loading

0 comments on commit 0d0fbf8

Please sign in to comment.