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
64582298
Commit
64582298
authored
Feb 21, 2010
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewire: core: combine a bit of repeated code
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
6e95dea7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
drivers/firewire/core-cdev.c
drivers/firewire/core-cdev.c
+5
-12
No files found.
drivers/firewire/core-cdev.c
View file @
64582298
...
@@ -1349,6 +1349,9 @@ static int dispatch_ioctl(struct client *client,
...
@@ -1349,6 +1349,9 @@ static int dispatch_ioctl(struct client *client,
union
ioctl_arg
buffer
;
union
ioctl_arg
buffer
;
int
ret
;
int
ret
;
if
(
fw_device_is_shutdown
(
client
->
device
))
return
-
ENODEV
;
if
(
_IOC_TYPE
(
cmd
)
!=
'#'
||
if
(
_IOC_TYPE
(
cmd
)
!=
'#'
||
_IOC_NR
(
cmd
)
>=
ARRAY_SIZE
(
ioctl_handlers
))
_IOC_NR
(
cmd
)
>=
ARRAY_SIZE
(
ioctl_handlers
))
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -1375,24 +1378,14 @@ static int dispatch_ioctl(struct client *client,
...
@@ -1375,24 +1378,14 @@ static int dispatch_ioctl(struct client *client,
static
long
fw_device_op_ioctl
(
struct
file
*
file
,
static
long
fw_device_op_ioctl
(
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
client
*
client
=
file
->
private_data
;
return
dispatch_ioctl
(
file
->
private_data
,
cmd
,
(
void
__user
*
)
arg
);
if
(
fw_device_is_shutdown
(
client
->
device
))
return
-
ENODEV
;
return
dispatch_ioctl
(
client
,
cmd
,
(
void
__user
*
)
arg
);
}
}
#ifdef CONFIG_COMPAT
#ifdef CONFIG_COMPAT
static
long
fw_device_op_compat_ioctl
(
struct
file
*
file
,
static
long
fw_device_op_compat_ioctl
(
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
client
*
client
=
file
->
private_data
;
return
dispatch_ioctl
(
file
->
private_data
,
cmd
,
compat_ptr
(
arg
));
if
(
fw_device_is_shutdown
(
client
->
device
))
return
-
ENODEV
;
return
dispatch_ioctl
(
client
,
cmd
,
compat_ptr
(
arg
));
}
}
#endif
#endif
...
...
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