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
877da78e
Commit
877da78e
authored
Nov 02, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: fix sparse warnings in cypress_m8 driver
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
02d30ac5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/cypress_m8.c
+4
-4
No files found.
drivers/usb/serial/cypress_m8.c
View file @
877da78e
...
...
@@ -740,13 +740,13 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
switch
(
cmd
)
{
case
TIOCGSERIAL
:
if
(
copy_to_user
((
void
*
)
arg
,
port
->
tty
->
termios
,
sizeof
(
struct
termios
)))
{
if
(
copy_to_user
((
void
__user
*
)
arg
,
port
->
tty
->
termios
,
sizeof
(
struct
termios
)))
{
return
-
EFAULT
;
}
return
(
0
);
break
;
case
TIOCSSERIAL
:
if
(
copy_from_user
(
port
->
tty
->
termios
,
(
void
*
)
arg
,
sizeof
(
struct
termios
)))
{
if
(
copy_from_user
(
port
->
tty
->
termios
,
(
void
__user
*
)
arg
,
sizeof
(
struct
termios
)))
{
return
-
EFAULT
;
}
/* here we need to call cypress_set_termios to invoke the new settings */
...
...
@@ -755,13 +755,13 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
break
;
/* these are called when setting baud rate from gpsd */
case
TCGETS
:
if
(
copy_to_user
((
void
*
)
arg
,
port
->
tty
->
termios
,
sizeof
(
struct
termios
)))
{
if
(
copy_to_user
((
void
__user
*
)
arg
,
port
->
tty
->
termios
,
sizeof
(
struct
termios
)))
{
return
-
EFAULT
;
}
return
(
0
);
break
;
case
TCSETS
:
if
(
copy_from_user
(
port
->
tty
->
termios
,
(
void
*
)
arg
,
sizeof
(
struct
termios
)))
{
if
(
copy_from_user
(
port
->
tty
->
termios
,
(
void
__user
*
)
arg
,
sizeof
(
struct
termios
)))
{
return
-
EFAULT
;
}
/* here we need to call cypress_set_termios to invoke the new settings */
...
...
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