Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0db169f9
Commit
0db169f9
authored
Nov 16, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
parents
d58a75ef
6e87abd0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
205 additions
and
4 deletions
+205
-4
drivers/media/dvb/cinergyT2/cinergyT2.c
drivers/media/dvb/cinergyT2/cinergyT2.c
+5
-4
fs/compat_ioctl.c
fs/compat_ioctl.c
+133
-0
include/linux/compat_ioctl.h
include/linux/compat_ioctl.h
+67
-0
No files found.
drivers/media/dvb/cinergyT2/cinergyT2.c
View file @
0db169f9
...
...
@@ -276,7 +276,7 @@ static void cinergyt2_free_stream_urbs (struct cinergyt2 *cinergyt2)
if
(
cinergyt2
->
stream_urb
[
i
])
usb_free_urb
(
cinergyt2
->
stream_urb
[
i
]);
pci_free_consistent
(
NULL
,
STREAM_URB_COUNT
*
STREAM_BUF_SIZE
,
usb_buffer_free
(
cinergyt2
->
udev
,
STREAM_URB_COUNT
*
STREAM_BUF_SIZE
,
cinergyt2
->
streambuf
,
cinergyt2
->
streambuf_dmahandle
);
}
...
...
@@ -284,9 +284,8 @@ static int cinergyt2_alloc_stream_urbs (struct cinergyt2 *cinergyt2)
{
int
i
;
cinergyt2
->
streambuf
=
pci_alloc_consistent
(
NULL
,
STREAM_URB_COUNT
*
STREAM_BUF_SIZE
,
&
cinergyt2
->
streambuf_dmahandle
);
cinergyt2
->
streambuf
=
usb_buffer_alloc
(
cinergyt2
->
udev
,
STREAM_URB_COUNT
*
STREAM_BUF_SIZE
,
SLAB_KERNEL
,
&
cinergyt2
->
streambuf_dmahandle
);
if
(
!
cinergyt2
->
streambuf
)
{
dprintk
(
1
,
"failed to alloc consistent stream memory area, bailing out!
\n
"
);
return
-
ENOMEM
;
...
...
@@ -780,6 +779,8 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
input_register_device
(
cinergyt2
->
rc_input_dev
);
schedule_delayed_work
(
&
cinergyt2
->
rc_query_work
,
HZ
/
2
);
return
0
;
}
static
void
cinergyt2_unregister_rc
(
struct
cinergyt2
*
cinergyt2
)
...
...
fs/compat_ioctl.c
View file @
0db169f9
...
...
@@ -121,6 +121,11 @@
#include <linux/hiddev.h>
#include <linux/dvb/audio.h>
#include <linux/dvb/dmx.h>
#include <linux/dvb/frontend.h>
#include <linux/dvb/video.h>
#undef INCLUDES
#endif
...
...
@@ -413,6 +418,128 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
return
err
;
}
struct
compat_dmx_event
{
dmx_event_t
event
;
compat_time_t
timeStamp
;
union
{
dmx_scrambling_status_t
scrambling
;
}
u
;
};
static
int
do_dmx_get_event
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
dmx_event
kevent
;
mm_segment_t
old_fs
=
get_fs
();
int
err
;
set_fs
(
KERNEL_DS
);
err
=
sys_ioctl
(
fd
,
cmd
,
(
unsigned
long
)
&
kevent
);
set_fs
(
old_fs
);
if
(
!
err
)
{
struct
compat_dmx_event
__user
*
up
=
compat_ptr
(
arg
);
err
=
put_user
(
kevent
.
event
,
&
up
->
event
);
err
|=
put_user
(
kevent
.
timeStamp
,
&
up
->
timeStamp
);
err
|=
put_user
(
kevent
.
u
.
scrambling
,
&
up
->
u
.
scrambling
);
if
(
err
)
err
=
-
EFAULT
;
}
return
err
;
}
struct
compat_video_event
{
int32_t
type
;
compat_time_t
timestamp
;
union
{
video_size_t
size
;
unsigned
int
frame_rate
;
}
u
;
};
static
int
do_video_get_event
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
video_event
kevent
;
mm_segment_t
old_fs
=
get_fs
();
int
err
;
set_fs
(
KERNEL_DS
);
err
=
sys_ioctl
(
fd
,
cmd
,
(
unsigned
long
)
&
kevent
);
set_fs
(
old_fs
);
if
(
!
err
)
{
struct
compat_video_event
__user
*
up
=
compat_ptr
(
arg
);
err
=
put_user
(
kevent
.
type
,
&
up
->
type
);
err
|=
put_user
(
kevent
.
timestamp
,
&
up
->
timestamp
);
err
|=
put_user
(
kevent
.
u
.
size
.
w
,
&
up
->
u
.
size
.
w
);
err
|=
put_user
(
kevent
.
u
.
size
.
h
,
&
up
->
u
.
size
.
h
);
err
|=
put_user
(
kevent
.
u
.
size
.
aspect_ratio
,
&
up
->
u
.
size
.
aspect_ratio
);
if
(
err
)
err
=
-
EFAULT
;
}
return
err
;
}
struct
compat_video_still_picture
{
compat_uptr_t
iFrame
;
int32_t
size
;
};
static
int
do_video_stillpicture
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
compat_video_still_picture
__user
*
up
;
struct
video_still_picture
__user
*
up_native
;
compat_uptr_t
fp
;
int32_t
size
;
int
err
;
up
=
(
struct
compat_video_still_picture
__user
*
)
arg
;
err
=
get_user
(
fp
,
&
up
->
iFrame
);
err
|=
get_user
(
size
,
&
up
->
size
);
if
(
err
)
return
-
EFAULT
;
up_native
=
compat_alloc_user_space
(
sizeof
(
struct
video_still_picture
));
put_user
(
compat_ptr
(
fp
),
&
up_native
->
iFrame
);
put_user
(
size
,
&
up_native
->
size
);
err
=
sys_ioctl
(
fd
,
cmd
,
(
unsigned
long
)
up_native
);
return
err
;
}
struct
compat_video_spu_palette
{
int
length
;
compat_uptr_t
palette
;
};
static
int
do_video_set_spu_palette
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
compat_video_spu_palette
__user
*
up
;
struct
video_spu_palette
__user
*
up_native
;
compat_uptr_t
palp
;
int
length
,
err
;
up
=
(
struct
compat_video_spu_palette
__user
*
)
arg
;
err
=
get_user
(
palp
,
&
up
->
palette
);
err
|=
get_user
(
length
,
&
up
->
length
);
up_native
=
compat_alloc_user_space
(
sizeof
(
struct
video_spu_palette
));
put_user
(
compat_ptr
(
palp
),
&
up_native
->
palette
);
put_user
(
length
,
&
up_native
->
length
);
err
=
sys_ioctl
(
fd
,
cmd
,
(
unsigned
long
)
up_native
);
return
err
;
}
#ifdef CONFIG_NET
static
int
do_siocgstamp
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
...
...
@@ -2954,5 +3081,11 @@ HANDLE_IOCTL(NCP_IOC_GETPRIVATEDATA_32, do_ncp_getprivatedata)
HANDLE_IOCTL
(
NCP_IOC_SETPRIVATEDATA_32
,
do_ncp_setprivatedata
)
#endif
/* dvb */
HANDLE_IOCTL
(
DMX_GET_EVENT
,
do_dmx_get_event
)
HANDLE_IOCTL
(
VIDEO_GET_EVENT
,
do_video_get_event
)
HANDLE_IOCTL
(
VIDEO_STILLPICTURE
,
do_video_stillpicture
)
HANDLE_IOCTL
(
VIDEO_SET_SPU_PALETTE
,
do_video_set_spu_palette
)
#undef DECLARES
#endif
include/linux/compat_ioctl.h
View file @
0db169f9
...
...
@@ -795,3 +795,70 @@ COMPATIBLE_IOCTL(HIDIOCGFLAG)
COMPATIBLE_IOCTL
(
HIDIOCSFLAG
)
COMPATIBLE_IOCTL
(
HIDIOCGCOLLECTIONINDEX
)
COMPATIBLE_IOCTL
(
HIDIOCGCOLLECTIONINFO
)
/* dvb */
COMPATIBLE_IOCTL
(
AUDIO_STOP
)
COMPATIBLE_IOCTL
(
AUDIO_PLAY
)
COMPATIBLE_IOCTL
(
AUDIO_PAUSE
)
COMPATIBLE_IOCTL
(
AUDIO_CONTINUE
)
COMPATIBLE_IOCTL
(
AUDIO_SELECT_SOURCE
)
COMPATIBLE_IOCTL
(
AUDIO_SET_MUTE
)
COMPATIBLE_IOCTL
(
AUDIO_SET_AV_SYNC
)
COMPATIBLE_IOCTL
(
AUDIO_SET_BYPASS_MODE
)
COMPATIBLE_IOCTL
(
AUDIO_CHANNEL_SELECT
)
COMPATIBLE_IOCTL
(
AUDIO_GET_STATUS
)
COMPATIBLE_IOCTL
(
AUDIO_GET_CAPABILITIES
)
COMPATIBLE_IOCTL
(
AUDIO_CLEAR_BUFFER
)
COMPATIBLE_IOCTL
(
AUDIO_SET_ID
)
COMPATIBLE_IOCTL
(
AUDIO_SET_MIXER
)
COMPATIBLE_IOCTL
(
AUDIO_SET_STREAMTYPE
)
COMPATIBLE_IOCTL
(
AUDIO_SET_EXT_ID
)
COMPATIBLE_IOCTL
(
AUDIO_SET_ATTRIBUTES
)
COMPATIBLE_IOCTL
(
AUDIO_SET_KARAOKE
)
COMPATIBLE_IOCTL
(
DMX_START
)
COMPATIBLE_IOCTL
(
DMX_STOP
)
COMPATIBLE_IOCTL
(
DMX_SET_FILTER
)
COMPATIBLE_IOCTL
(
DMX_SET_PES_FILTER
)
COMPATIBLE_IOCTL
(
DMX_SET_BUFFER_SIZE
)
COMPATIBLE_IOCTL
(
DMX_GET_PES_PIDS
)
COMPATIBLE_IOCTL
(
DMX_GET_CAPS
)
COMPATIBLE_IOCTL
(
DMX_SET_SOURCE
)
COMPATIBLE_IOCTL
(
DMX_GET_STC
)
COMPATIBLE_IOCTL
(
FE_GET_INFO
)
COMPATIBLE_IOCTL
(
FE_DISEQC_RESET_OVERLOAD
)
COMPATIBLE_IOCTL
(
FE_DISEQC_SEND_MASTER_CMD
)
COMPATIBLE_IOCTL
(
FE_DISEQC_RECV_SLAVE_REPLY
)
COMPATIBLE_IOCTL
(
FE_DISEQC_SEND_BURST
)
COMPATIBLE_IOCTL
(
FE_SET_TONE
)
COMPATIBLE_IOCTL
(
FE_SET_VOLTAGE
)
COMPATIBLE_IOCTL
(
FE_ENABLE_HIGH_LNB_VOLTAGE
)
COMPATIBLE_IOCTL
(
FE_READ_STATUS
)
COMPATIBLE_IOCTL
(
FE_READ_BER
)
COMPATIBLE_IOCTL
(
FE_READ_SIGNAL_STRENGTH
)
COMPATIBLE_IOCTL
(
FE_READ_SNR
)
COMPATIBLE_IOCTL
(
FE_READ_UNCORRECTED_BLOCKS
)
COMPATIBLE_IOCTL
(
FE_SET_FRONTEND
)
COMPATIBLE_IOCTL
(
FE_GET_FRONTEND
)
COMPATIBLE_IOCTL
(
FE_GET_EVENT
)
COMPATIBLE_IOCTL
(
FE_DISHNETWORK_SEND_LEGACY_CMD
)
COMPATIBLE_IOCTL
(
VIDEO_STOP
)
COMPATIBLE_IOCTL
(
VIDEO_PLAY
)
COMPATIBLE_IOCTL
(
VIDEO_FREEZE
)
COMPATIBLE_IOCTL
(
VIDEO_CONTINUE
)
COMPATIBLE_IOCTL
(
VIDEO_SELECT_SOURCE
)
COMPATIBLE_IOCTL
(
VIDEO_SET_BLANK
)
COMPATIBLE_IOCTL
(
VIDEO_GET_STATUS
)
COMPATIBLE_IOCTL
(
VIDEO_SET_DISPLAY_FORMAT
)
COMPATIBLE_IOCTL
(
VIDEO_FAST_FORWARD
)
COMPATIBLE_IOCTL
(
VIDEO_SLOWMOTION
)
COMPATIBLE_IOCTL
(
VIDEO_GET_CAPABILITIES
)
COMPATIBLE_IOCTL
(
VIDEO_CLEAR_BUFFER
)
COMPATIBLE_IOCTL
(
VIDEO_SET_ID
)
COMPATIBLE_IOCTL
(
VIDEO_SET_STREAMTYPE
)
COMPATIBLE_IOCTL
(
VIDEO_SET_FORMAT
)
COMPATIBLE_IOCTL
(
VIDEO_SET_SYSTEM
)
COMPATIBLE_IOCTL
(
VIDEO_SET_HIGHLIGHT
)
COMPATIBLE_IOCTL
(
VIDEO_SET_SPU
)
COMPATIBLE_IOCTL
(
VIDEO_GET_NAVI
)
COMPATIBLE_IOCTL
(
VIDEO_SET_ATTRIBUTES
)
COMPATIBLE_IOCTL
(
VIDEO_GET_SIZE
)
COMPATIBLE_IOCTL
(
VIDEO_GET_FRAME_RATE
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment