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
nexedi
linux
Commits
b9fdf644
Commit
b9fdf644
authored
Apr 07, 2003
by
Alan Cox
Committed by
Linus Torvalds
Apr 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] exterminate compatmac in sx
(compatmac cleanup is all Adrian Bunk)
parent
a488a1d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
drivers/char/sx.c
drivers/char/sx.c
+18
-19
No files found.
drivers/char/sx.c
View file @
b9fdf644
...
@@ -238,7 +238,6 @@
...
@@ -238,7 +238,6 @@
#include "sxboards.h"
#include "sxboards.h"
#include "sxwindow.h"
#include "sxwindow.h"
#include <linux/compatmac.h>
#include <linux/generic_serial.h>
#include <linux/generic_serial.h>
#include "sx.h"
#include "sx.h"
...
@@ -1726,9 +1725,9 @@ static int sx_fw_ioctl (struct inode *inode, struct file *filp,
...
@@ -1726,9 +1725,9 @@ static int sx_fw_ioctl (struct inode *inode, struct file *filp,
tmp
=
kmalloc
(
SX_CHUNK_SIZE
,
GFP_USER
);
tmp
=
kmalloc
(
SX_CHUNK_SIZE
,
GFP_USER
);
if
(
!
tmp
)
return
-
ENOMEM
;
if
(
!
tmp
)
return
-
ENOMEM
;
G
et_user
(
nbytes
,
descr
++
);
g
et_user
(
nbytes
,
descr
++
);
G
et_user
(
offset
,
descr
++
);
g
et_user
(
offset
,
descr
++
);
G
et_user
(
data
,
descr
++
);
g
et_user
(
data
,
descr
++
);
while
(
nbytes
&&
data
)
{
while
(
nbytes
&&
data
)
{
for
(
i
=
0
;
i
<
nbytes
;
i
+=
SX_CHUNK_SIZE
)
{
for
(
i
=
0
;
i
<
nbytes
;
i
+=
SX_CHUNK_SIZE
)
{
if
(
copy_from_user
(
tmp
,
(
char
*
)
data
+
i
,
if
(
copy_from_user
(
tmp
,
(
char
*
)
data
+
i
,
...
@@ -1740,9 +1739,9 @@ static int sx_fw_ioctl (struct inode *inode, struct file *filp,
...
@@ -1740,9 +1739,9 @@ static int sx_fw_ioctl (struct inode *inode, struct file *filp,
(
i
+
SX_CHUNK_SIZE
>
nbytes
)
?
nbytes
-
i
:
SX_CHUNK_SIZE
);
(
i
+
SX_CHUNK_SIZE
>
nbytes
)
?
nbytes
-
i
:
SX_CHUNK_SIZE
);
}
}
G
et_user
(
nbytes
,
descr
++
);
g
et_user
(
nbytes
,
descr
++
);
G
et_user
(
offset
,
descr
++
);
g
et_user
(
offset
,
descr
++
);
G
et_user
(
data
,
descr
++
);
g
et_user
(
data
,
descr
++
);
}
}
kfree
(
tmp
);
kfree
(
tmp
);
sx_nports
+=
sx_init_board
(
board
);
sx_nports
+=
sx_init_board
(
board
);
...
@@ -1816,13 +1815,13 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
...
@@ -1816,13 +1815,13 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
rc
=
0
;
rc
=
0
;
switch
(
cmd
)
{
switch
(
cmd
)
{
case
TIOCGSOFTCAR
:
case
TIOCGSOFTCAR
:
rc
=
P
ut_user
(((
tty
->
termios
->
c_cflag
&
CLOCAL
)
?
1
:
0
),
rc
=
p
ut_user
(((
tty
->
termios
->
c_cflag
&
CLOCAL
)
?
1
:
0
),
(
unsigned
int
*
)
arg
);
(
unsigned
int
*
)
arg
);
break
;
break
;
case
TIOCSSOFTCAR
:
case
TIOCSSOFTCAR
:
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
int
)))
==
0
)
{
sizeof
(
int
)))
==
0
)
{
G
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
g
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
tty
->
termios
->
c_cflag
=
tty
->
termios
->
c_cflag
=
(
tty
->
termios
->
c_cflag
&
~
CLOCAL
)
|
(
tty
->
termios
->
c_cflag
&
~
CLOCAL
)
|
(
ival
?
CLOCAL
:
0
);
(
ival
?
CLOCAL
:
0
);
...
@@ -1848,7 +1847,7 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
...
@@ -1848,7 +1847,7 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
case
TIOCMBIS
:
case
TIOCMBIS
:
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
unsigned
int
)))
==
0
)
{
sizeof
(
unsigned
int
)))
==
0
)
{
G
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
g
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
sx_setsignals
(
port
,
((
ival
&
TIOCM_DTR
)
?
1
:
-
1
),
sx_setsignals
(
port
,
((
ival
&
TIOCM_DTR
)
?
1
:
-
1
),
((
ival
&
TIOCM_RTS
)
?
1
:
-
1
));
((
ival
&
TIOCM_RTS
)
?
1
:
-
1
));
sx_reconfigure_port
(
port
);
sx_reconfigure_port
(
port
);
...
@@ -1857,7 +1856,7 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
...
@@ -1857,7 +1856,7 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
case
TIOCMBIC
:
case
TIOCMBIC
:
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
unsigned
int
)))
==
0
)
{
sizeof
(
unsigned
int
)))
==
0
)
{
G
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
g
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
sx_setsignals
(
port
,
((
ival
&
TIOCM_DTR
)
?
0
:
-
1
),
sx_setsignals
(
port
,
((
ival
&
TIOCM_DTR
)
?
0
:
-
1
),
((
ival
&
TIOCM_RTS
)
?
0
:
-
1
));
((
ival
&
TIOCM_RTS
)
?
0
:
-
1
));
sx_reconfigure_port
(
port
);
sx_reconfigure_port
(
port
);
...
@@ -1866,7 +1865,7 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
...
@@ -1866,7 +1865,7 @@ static int sx_ioctl (struct tty_struct * tty, struct file * filp,
case
TIOCMSET
:
case
TIOCMSET
:
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
unsigned
int
)))
==
0
)
{
sizeof
(
unsigned
int
)))
==
0
)
{
G
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
g
et_user
(
ival
,
(
unsigned
int
*
)
arg
);
sx_setsignals
(
port
,
((
ival
&
TIOCM_DTR
)
?
1
:
0
),
sx_setsignals
(
port
,
((
ival
&
TIOCM_DTR
)
?
1
:
0
),
((
ival
&
TIOCM_RTS
)
?
1
:
0
));
((
ival
&
TIOCM_RTS
)
?
1
:
0
));
sx_reconfigure_port
(
port
);
sx_reconfigure_port
(
port
);
...
@@ -2484,7 +2483,7 @@ static void fix_sx_pci (PDEV, struct sx_board *board)
...
@@ -2484,7 +2483,7 @@ static void fix_sx_pci (PDEV, struct sx_board *board)
printk
(
KERN_DEBUG
"sx: performing cntrl reg fix: %08x -> %08x
\n
"
,
t
,
CNTRL_REG_GOODVALUE
);
printk
(
KERN_DEBUG
"sx: performing cntrl reg fix: %08x -> %08x
\n
"
,
t
,
CNTRL_REG_GOODVALUE
);
writel
(
CNTRL_REG_GOODVALUE
,
rebase
+
CNTRL_REG_OFFSET
);
writel
(
CNTRL_REG_GOODVALUE
,
rebase
+
CNTRL_REG_OFFSET
);
}
}
my_iounmap
(
hwbase
,
rebase
);
iounmap
((
char
*
)
rebase
);
}
}
#endif
#endif
...
@@ -2574,7 +2573,7 @@ static int __init sx_init(void)
...
@@ -2574,7 +2573,7 @@ static int __init sx_init(void)
0x18000 .... */
0x18000 .... */
if
(
IS_CF_BOARD
(
board
))
board
->
base
+=
0x18000
;
if
(
IS_CF_BOARD
(
board
))
board
->
base
+=
0x18000
;
board
->
irq
=
get_irq
(
pdev
)
;
board
->
irq
=
pdev
->
irq
;
sx_dprintk
(
SX_DEBUG_PROBE
,
"Got a specialix card: %x/%lx(%d) %x.
\n
"
,
sx_dprintk
(
SX_DEBUG_PROBE
,
"Got a specialix card: %x/%lx(%d) %x.
\n
"
,
tint
,
boards
[
found
].
base
,
board
->
irq
,
board
->
flags
);
tint
,
boards
[
found
].
base
,
board
->
irq
,
board
->
flags
);
...
@@ -2583,7 +2582,7 @@ static int __init sx_init(void)
...
@@ -2583,7 +2582,7 @@ static int __init sx_init(void)
found
++
;
found
++
;
fix_sx_pci
(
pdev
,
board
);
fix_sx_pci
(
pdev
,
board
);
}
else
}
else
my_iounmap
(
board
->
hw_base
,
board
->
base
);
iounmap
((
char
*
)
(
board
->
base
)
);
}
}
}
}
#endif
#endif
...
@@ -2600,7 +2599,7 @@ static int __init sx_init(void)
...
@@ -2600,7 +2599,7 @@ static int __init sx_init(void)
if
(
probe_sx
(
board
))
{
if
(
probe_sx
(
board
))
{
found
++
;
found
++
;
}
else
{
}
else
{
my_iounmap
(
board
->
hw_base
,
board
->
base
);
iounmap
((
char
*
)
(
board
->
base
)
);
}
}
}
}
...
@@ -2616,7 +2615,7 @@ static int __init sx_init(void)
...
@@ -2616,7 +2615,7 @@ static int __init sx_init(void)
if
(
probe_si
(
board
))
{
if
(
probe_si
(
board
))
{
found
++
;
found
++
;
}
else
{
}
else
{
my_iounmap
(
board
->
hw_base
,
board
->
base
);
iounmap
((
char
*
)
(
board
->
base
)
);
}
}
}
}
for
(
i
=
0
;
i
<
NR_SI1_ADDRS
;
i
++
)
{
for
(
i
=
0
;
i
<
NR_SI1_ADDRS
;
i
++
)
{
...
@@ -2631,7 +2630,7 @@ static int __init sx_init(void)
...
@@ -2631,7 +2630,7 @@ static int __init sx_init(void)
if
(
probe_si
(
board
))
{
if
(
probe_si
(
board
))
{
found
++
;
found
++
;
}
else
{
}
else
{
my_iounmap
(
board
->
hw_base
,
board
->
base
);
iounmap
((
char
*
)
(
board
->
base
)
);
}
}
}
}
...
@@ -2692,7 +2691,7 @@ static void __exit sx_exit (void)
...
@@ -2692,7 +2691,7 @@ static void __exit sx_exit (void)
/* It is safe/allowed to del_timer a non-active timer */
/* It is safe/allowed to del_timer a non-active timer */
del_timer
(
&
board
->
timer
);
del_timer
(
&
board
->
timer
);
my_iounmap
(
board
->
hw_base
,
board
->
base
);
iounmap
((
char
*
)
(
board
->
base
)
);
}
}
}
}
if
(
misc_deregister
(
&
sx_fw_device
)
<
0
)
{
if
(
misc_deregister
(
&
sx_fw_device
)
<
0
)
{
...
...
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