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
79611bfd
Commit
79611bfd
authored
Oct 16, 2002
by
Jaroslav Kysela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA update
- fixed compilation of ioctl32 from David S. Miller
parent
359dad18
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
sound/core/ioctl32/ioctl32.c
sound/core/ioctl32/ioctl32.c
+4
-3
sound/core/ioctl32/ioctl32.h
sound/core/ioctl32/ioctl32.h
+2
-2
sound/core/ioctl32/pcm32.c
sound/core/ioctl32/pcm32.c
+5
-4
No files found.
sound/core/ioctl32/ioctl32.c
View file @
79611bfd
...
...
@@ -23,6 +23,7 @@
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/time.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/control.h>
...
...
@@ -287,13 +288,13 @@ static int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd, unsign
data
->
id
=
data32
->
id
;
data
->
indirect
=
data32
->
indirect
;
if
(
data
->
indirect
)
/* FIXME: this is not correct for long arrays */
data
.
value
.
integer
.
value_ptr
=
(
void
*
)
TO_PTR
(
data32
->
value
.
integer
.
value_ptr
);
data
->
value
.
integer
.
value_ptr
=
(
void
*
)
TO_PTR
(
data32
->
value
.
integer
.
value_ptr
);
type
=
get_ctl_type
(
file
,
&
data
->
id
);
if
(
type
<
0
)
{
err
=
type
;
goto
__end
;
}
if
(
!
data
.
indirect
)
{
if
(
!
data
->
indirect
)
{
switch
(
type
)
{
case
SNDRV_CTL_ELEM_TYPE_BOOLEAN
:
case
SNDRV_CTL_ELEM_TYPE_INTEGER
:
...
...
@@ -328,7 +329,7 @@ static int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd, unsign
if
(
err
<
0
)
goto
__end
;
/* restore info to 32bit */
if
(
!
data
.
indirect
)
{
if
(
!
data
->
indirect
)
{
switch
(
type
)
{
case
SNDRV_CTL_ELEM_TYPE_BOOLEAN
:
case
SNDRV_CTL_ELEM_TYPE_INTEGER
:
...
...
sound/core/ioctl32/ioctl32.h
View file @
79611bfd
...
...
@@ -86,8 +86,8 @@ static int _snd_ioctl32_##type(unsigned int fd, unsigned int cmd, unsigned long
struct sndrv_##type *data;\
mm_segment_t oldseg;\
int err;\
data32 = k
c
alloc(sizeof(*data32), GFP_KERNEL); \
data = k
c
alloc(sizeof(*data), GFP_KERNEL); \
data32 = k
m
alloc(sizeof(*data32), GFP_KERNEL); \
data = k
m
alloc(sizeof(*data), GFP_KERNEL); \
if (data32 == NULL || data == NULL) { \
err = -ENOMEM; \
goto __end; \
...
...
sound/core/ioctl32/pcm32.c
View file @
79611bfd
...
...
@@ -20,6 +20,7 @@
#include <sound/driver.h>
#include <linux/time.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include "ioctl32.h"
...
...
@@ -230,7 +231,7 @@ static int _snd_ioctl32_xfern(unsigned int fd, unsigned int cmd, unsigned long a
snd_pcm_file_t
*
pcm_file
;
snd_pcm_substream_t
*
substream
;
struct
sndrv_xfern32
data32
,
*
srcptr
=
(
struct
sndrv_xfern32
*
)
arg
;
void
*
bufs
=
NULL
;
void
*
*
bufs
=
NULL
;
int
err
=
0
,
ch
,
i
;
u32
*
bufptr
;
mm_segment_t
oldseg
;
...
...
@@ -260,7 +261,7 @@ static int _snd_ioctl32_xfern(unsigned int fd, unsigned int cmd, unsigned long a
return
-
EFAULT
;
__get_user
(
data32
.
bufs
,
&
srcptr
->
bufs
);
bufptr
=
(
u32
*
)
TO_PTR
(
data32
.
bufs
);
bufs
=
kmalloc
(
sizeof
(
void
*
)
*
128
,
GFP_KERNEL
)
bufs
=
kmalloc
(
sizeof
(
void
*
)
*
128
,
GFP_KERNEL
)
;
if
(
bufs
==
NULL
)
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
ch
;
i
++
)
{
...
...
@@ -352,8 +353,8 @@ static int _snd_ioctl32_pcm_hw_params_old(unsigned int fd, unsigned int cmd, uns
mm_segment_t
oldseg
;
int
err
;
data32
=
kcalloc
(
sizeof
(
*
data32
),
GFP_KERNEL
);
data
=
kcalloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
data32
=
snd_
kcalloc
(
sizeof
(
*
data32
),
GFP_KERNEL
);
data
=
snd_
kcalloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
if
(
data32
==
NULL
||
data
==
NULL
)
{
err
=
-
ENOMEM
;
goto
__end
;
...
...
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