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
bec737de
Commit
bec737de
authored
Jun 23, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 23, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: trivial drivers/isdn/* annotations
parent
f4a4c86b
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
81 deletions
+77
-81
drivers/isdn/capi/capi.c
drivers/isdn/capi/capi.c
+20
-22
drivers/isdn/i4l/isdn_common.c
drivers/isdn/i4l/isdn_common.c
+39
-39
drivers/isdn/i4l/isdn_net.c
drivers/isdn/i4l/isdn_net.c
+10
-11
drivers/isdn/i4l/isdn_net.h
drivers/isdn/i4l/isdn_net.h
+2
-2
drivers/isdn/i4l/isdn_tty.c
drivers/isdn/i4l/isdn_tty.c
+4
-4
drivers/isdn/i4l/isdn_x25iface.c
drivers/isdn/i4l/isdn_x25iface.c
+2
-3
No files found.
drivers/isdn/capi/capi.c
View file @
bec737de
...
@@ -650,7 +650,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
...
@@ -650,7 +650,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
/* -------- file_operations for capidev ----------------------------- */
/* -------- file_operations for capidev ----------------------------- */
static
ssize_t
static
ssize_t
capi_read
(
struct
file
*
file
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
capi_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
struct
capidev
*
cdev
=
(
struct
capidev
*
)
file
->
private_data
;
struct
capidev
*
cdev
=
(
struct
capidev
*
)
file
->
private_data
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
...
@@ -693,7 +693,7 @@ capi_read(struct file *file, char *buf, size_t count, loff_t *ppos)
...
@@ -693,7 +693,7 @@ capi_read(struct file *file, char *buf, size_t count, loff_t *ppos)
}
}
static
ssize_t
static
ssize_t
capi_write
(
struct
file
*
file
,
const
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
capi_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
struct
capidev
*
cdev
=
(
struct
capidev
*
)
file
->
private_data
;
struct
capidev
*
cdev
=
(
struct
capidev
*
)
file
->
private_data
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
...
@@ -766,6 +766,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -766,6 +766,7 @@ capi_ioctl(struct inode *inode, struct file *file,
struct
capi20_appl
*
ap
=
&
cdev
->
ap
;
struct
capi20_appl
*
ap
=
&
cdev
->
ap
;
capi_ioctl_struct
data
;
capi_ioctl_struct
data
;
int
retval
=
-
EINVAL
;
int
retval
=
-
EINVAL
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
switch
(
cmd
)
{
switch
(
cmd
)
{
case
CAPI_REGISTER
:
case
CAPI_REGISTER
:
...
@@ -773,7 +774,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -773,7 +774,7 @@ capi_ioctl(struct inode *inode, struct file *file,
if
(
ap
->
applid
)
if
(
ap
->
applid
)
return
-
EEXIST
;
return
-
EEXIST
;
if
(
copy_from_user
(
&
cdev
->
ap
.
rparam
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
cdev
->
ap
.
rparam
,
argp
,
sizeof
(
struct
capi_register_params
)))
sizeof
(
struct
capi_register_params
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -789,14 +790,13 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -789,14 +790,13 @@ capi_ioctl(struct inode *inode, struct file *file,
case
CAPI_GET_VERSION
:
case
CAPI_GET_VERSION
:
{
{
if
(
copy_from_user
((
void
*
)
&
data
.
contr
,
if
(
copy_from_user
(
&
data
.
contr
,
argp
,
(
void
*
)
arg
,
sizeof
(
data
.
contr
)))
sizeof
(
data
.
contr
)))
return
-
EFAULT
;
return
-
EFAULT
;
cdev
->
errcode
=
capi20_get_version
(
data
.
contr
,
&
data
.
version
);
cdev
->
errcode
=
capi20_get_version
(
data
.
contr
,
&
data
.
version
);
if
(
cdev
->
errcode
)
if
(
cdev
->
errcode
)
return
-
EIO
;
return
-
EIO
;
if
(
copy_to_user
(
(
void
*
)
arg
,
(
void
*
)
&
data
.
version
,
if
(
copy_to_user
(
argp
,
&
data
.
version
,
sizeof
(
data
.
version
)))
sizeof
(
data
.
version
)))
return
-
EFAULT
;
return
-
EFAULT
;
}
}
...
@@ -804,20 +804,20 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -804,20 +804,20 @@ capi_ioctl(struct inode *inode, struct file *file,
case
CAPI_GET_SERIAL
:
case
CAPI_GET_SERIAL
:
{
{
if
(
copy_from_user
(
(
void
*
)
&
data
.
contr
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
data
.
contr
,
argp
,
sizeof
(
data
.
contr
)))
sizeof
(
data
.
contr
)))
return
-
EFAULT
;
return
-
EFAULT
;
cdev
->
errcode
=
capi20_get_serial
(
data
.
contr
,
data
.
serial
);
cdev
->
errcode
=
capi20_get_serial
(
data
.
contr
,
data
.
serial
);
if
(
cdev
->
errcode
)
if
(
cdev
->
errcode
)
return
-
EIO
;
return
-
EIO
;
if
(
copy_to_user
(
(
void
*
)
arg
,
(
void
*
)
data
.
serial
,
if
(
copy_to_user
(
argp
,
data
.
serial
,
sizeof
(
data
.
serial
)))
sizeof
(
data
.
serial
)))
return
-
EFAULT
;
return
-
EFAULT
;
}
}
return
0
;
return
0
;
case
CAPI_GET_PROFILE
:
case
CAPI_GET_PROFILE
:
{
{
if
(
copy_from_user
(
(
void
*
)
&
data
.
contr
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
data
.
contr
,
argp
,
sizeof
(
data
.
contr
)))
sizeof
(
data
.
contr
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -826,8 +826,8 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -826,8 +826,8 @@ capi_ioctl(struct inode *inode, struct file *file,
if
(
cdev
->
errcode
)
if
(
cdev
->
errcode
)
return
-
EIO
;
return
-
EIO
;
retval
=
copy_to_user
(
(
void
*
)
arg
,
retval
=
copy_to_user
(
argp
,
(
void
*
)
&
data
.
profile
.
ncontroller
,
&
data
.
profile
.
ncontroller
,
sizeof
(
data
.
profile
.
ncontroller
));
sizeof
(
data
.
profile
.
ncontroller
));
}
else
{
}
else
{
...
@@ -835,8 +835,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -835,8 +835,7 @@ capi_ioctl(struct inode *inode, struct file *file,
if
(
cdev
->
errcode
)
if
(
cdev
->
errcode
)
return
-
EIO
;
return
-
EIO
;
retval
=
copy_to_user
((
void
*
)
arg
,
retval
=
copy_to_user
(
argp
,
&
data
.
profile
,
(
void
*
)
&
data
.
profile
,
sizeof
(
data
.
profile
));
sizeof
(
data
.
profile
));
}
}
if
(
retval
)
if
(
retval
)
...
@@ -846,14 +845,14 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -846,14 +845,14 @@ capi_ioctl(struct inode *inode, struct file *file,
case
CAPI_GET_MANUFACTURER
:
case
CAPI_GET_MANUFACTURER
:
{
{
if
(
copy_from_user
(
(
void
*
)
&
data
.
contr
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
data
.
contr
,
argp
,
sizeof
(
data
.
contr
)))
sizeof
(
data
.
contr
)))
return
-
EFAULT
;
return
-
EFAULT
;
cdev
->
errcode
=
capi20_get_manufacturer
(
data
.
contr
,
data
.
manufacturer
);
cdev
->
errcode
=
capi20_get_manufacturer
(
data
.
contr
,
data
.
manufacturer
);
if
(
cdev
->
errcode
)
if
(
cdev
->
errcode
)
return
-
EIO
;
return
-
EIO
;
if
(
copy_to_user
(
(
void
*
)
arg
,
(
void
*
)
data
.
manufacturer
,
if
(
copy_to_user
(
argp
,
data
.
manufacturer
,
sizeof
(
data
.
manufacturer
)))
sizeof
(
data
.
manufacturer
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -863,7 +862,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -863,7 +862,7 @@ capi_ioctl(struct inode *inode, struct file *file,
data
.
errcode
=
cdev
->
errcode
;
data
.
errcode
=
cdev
->
errcode
;
cdev
->
errcode
=
CAPI_NOERROR
;
cdev
->
errcode
=
CAPI_NOERROR
;
if
(
arg
)
{
if
(
arg
)
{
if
(
copy_to_user
(
(
void
*
)
arg
,
(
void
*
)
&
data
.
errcode
,
if
(
copy_to_user
(
argp
,
&
data
.
errcode
,
sizeof
(
data
.
errcode
)))
sizeof
(
data
.
errcode
)))
return
-
EFAULT
;
return
-
EFAULT
;
}
}
...
@@ -879,7 +878,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -879,7 +878,7 @@ capi_ioctl(struct inode *inode, struct file *file,
struct
capi_manufacturer_cmd
mcmd
;
struct
capi_manufacturer_cmd
mcmd
;
if
(
!
capable
(
CAP_SYS_ADMIN
))
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
return
-
EPERM
;
if
(
copy_from_user
(
(
void
*
)
&
mcmd
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
mcmd
,
argp
,
sizeof
(
mcmd
)))
sizeof
(
mcmd
)))
return
-
EFAULT
;
return
-
EFAULT
;
return
capi20_manufacturer
(
mcmd
.
cmd
,
mcmd
.
data
);
return
capi20_manufacturer
(
mcmd
.
cmd
,
mcmd
.
data
);
...
@@ -890,7 +889,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -890,7 +889,7 @@ capi_ioctl(struct inode *inode, struct file *file,
case
CAPI_CLR_FLAGS
:
case
CAPI_CLR_FLAGS
:
{
{
unsigned
userflags
;
unsigned
userflags
;
if
(
copy_from_user
(
(
void
*
)
&
userflags
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
userflags
,
argp
,
sizeof
(
userflags
)))
sizeof
(
userflags
)))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
cmd
==
CAPI_SET_FLAGS
)
if
(
cmd
==
CAPI_SET_FLAGS
)
...
@@ -901,7 +900,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -901,7 +900,7 @@ capi_ioctl(struct inode *inode, struct file *file,
return
0
;
return
0
;
case
CAPI_GET_FLAGS
:
case
CAPI_GET_FLAGS
:
if
(
copy_to_user
(
(
void
*
)
arg
,
(
void
*
)
&
cdev
->
userflags
,
if
(
copy_to_user
(
argp
,
&
cdev
->
userflags
,
sizeof
(
cdev
->
userflags
)))
sizeof
(
cdev
->
userflags
)))
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
...
@@ -914,8 +913,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -914,8 +913,7 @@ capi_ioctl(struct inode *inode, struct file *file,
#endif
/* CONFIG_ISDN_CAPI_MIDDLEWARE */
#endif
/* CONFIG_ISDN_CAPI_MIDDLEWARE */
unsigned
ncci
;
unsigned
ncci
;
int
count
=
0
;
int
count
=
0
;
if
(
copy_from_user
((
void
*
)
&
ncci
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
ncci
,
argp
,
sizeof
(
ncci
)))
sizeof
(
ncci
)))
return
-
EFAULT
;
return
-
EFAULT
;
down
(
&
cdev
->
ncci_list_sem
);
down
(
&
cdev
->
ncci_list_sem
);
...
@@ -940,7 +938,7 @@ capi_ioctl(struct inode *inode, struct file *file,
...
@@ -940,7 +938,7 @@ capi_ioctl(struct inode *inode, struct file *file,
struct
capiminor
*
mp
;
struct
capiminor
*
mp
;
unsigned
ncci
;
unsigned
ncci
;
int
unit
=
0
;
int
unit
=
0
;
if
(
copy_from_user
(
(
void
*
)
&
ncci
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
ncci
,
argp
,
sizeof
(
ncci
)))
sizeof
(
ncci
)))
return
-
EFAULT
;
return
-
EFAULT
;
down
(
&
cdev
->
ncci_list_sem
);
down
(
&
cdev
->
ncci_list_sem
);
...
...
drivers/isdn/i4l/isdn_common.c
View file @
bec737de
This diff is collapsed.
Click to expand it.
drivers/isdn/i4l/isdn_net.c
View file @
bec737de
...
@@ -315,7 +315,7 @@ isdn_net_unbind_channel(isdn_net_local * lp)
...
@@ -315,7 +315,7 @@ isdn_net_unbind_channel(isdn_net_local * lp)
unsigned
long
last_jiffies
=
-
HZ
;
unsigned
long
last_jiffies
=
-
HZ
;
void
void
isdn_net_autohup
()
isdn_net_autohup
(
void
)
{
{
isdn_net_dev
*
p
=
dev
->
netdev
;
isdn_net_dev
*
p
=
dev
->
netdev
;
int
anymore
;
int
anymore
;
...
@@ -1443,15 +1443,14 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
...
@@ -1443,15 +1443,14 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* get/set keepalive period */
/* get/set keepalive period */
case
SIOCGKEEPPERIOD
:
case
SIOCGKEEPPERIOD
:
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_keepalive_period
);
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_keepalive_period
);
if
(
copy_to_user
(
(
char
*
)
ifr
->
ifr_ifru
.
ifru
_data
,
if
(
copy_to_user
(
ifr
->
ifr
_data
,
(
int
*
)
&
lp
->
cisco_keepalive_period
,
len
))
&
lp
->
cisco_keepalive_period
,
len
))
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
break
;
break
;
case
SIOCSKEEPPERIOD
:
case
SIOCSKEEPPERIOD
:
tmp
=
lp
->
cisco_keepalive_period
;
tmp
=
lp
->
cisco_keepalive_period
;
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_keepalive_period
);
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_keepalive_period
);
if
(
copy_from_user
((
int
*
)
&
period
,
if
(
copy_from_user
(
&
period
,
ifr
->
ifr_data
,
len
))
(
char
*
)
ifr
->
ifr_ifru
.
ifru_data
,
len
))
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
if
((
period
>
0
)
&&
(
period
<=
32767
))
if
((
period
>
0
)
&&
(
period
<=
32767
))
lp
->
cisco_keepalive_period
=
period
;
lp
->
cisco_keepalive_period
=
period
;
...
@@ -1470,14 +1469,14 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
...
@@ -1470,14 +1469,14 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* get/set debugging */
/* get/set debugging */
case
SIOCGDEBSERINT
:
case
SIOCGDEBSERINT
:
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_debserint
);
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_debserint
);
if
(
copy_to_user
(
(
char
*
)
ifr
->
ifr_ifru
.
ifru
_data
,
if
(
copy_to_user
(
ifr
->
ifr
_data
,
(
char
*
)
&
lp
->
cisco_debserint
,
len
))
&
lp
->
cisco_debserint
,
len
))
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
break
;
break
;
case
SIOCSDEBSERINT
:
case
SIOCSDEBSERINT
:
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_debserint
);
len
=
(
unsigned
long
)
sizeof
(
lp
->
cisco_debserint
);
if
(
copy_from_user
(
(
char
*
)
&
debserint
,
if
(
copy_from_user
(
&
debserint
,
(
char
*
)
ifr
->
ifr_ifru
.
ifru
_data
,
len
))
ifr
->
ifr
_data
,
len
))
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
if
((
debserint
>=
0
)
&&
(
debserint
<=
64
))
if
((
debserint
>=
0
)
&&
(
debserint
<=
64
))
lp
->
cisco_debserint
=
debserint
;
lp
->
cisco_debserint
=
debserint
;
...
@@ -2968,7 +2967,7 @@ isdn_net_addphone(isdn_net_ioctl_phone * phone)
...
@@ -2968,7 +2967,7 @@ isdn_net_addphone(isdn_net_ioctl_phone * phone)
* This might sleep and must be called with the isdn semaphore down.
* This might sleep and must be called with the isdn semaphore down.
*/
*/
int
int
isdn_net_getphones
(
isdn_net_ioctl_phone
*
phone
,
char
*
phones
)
isdn_net_getphones
(
isdn_net_ioctl_phone
*
phone
,
char
__user
*
phones
)
{
{
isdn_net_dev
*
p
=
isdn_net_findif
(
phone
->
name
);
isdn_net_dev
*
p
=
isdn_net_findif
(
phone
->
name
);
int
inout
=
phone
->
outgoing
&
1
;
int
inout
=
phone
->
outgoing
&
1
;
...
@@ -3001,7 +3000,7 @@ isdn_net_getphones(isdn_net_ioctl_phone * phone, char *phones)
...
@@ -3001,7 +3000,7 @@ isdn_net_getphones(isdn_net_ioctl_phone * phone, char *phones)
* to user space.
* to user space.
*/
*/
int
int
isdn_net_getpeer
(
isdn_net_ioctl_phone
*
phone
,
isdn_net_ioctl_phone
*
peer
)
isdn_net_getpeer
(
isdn_net_ioctl_phone
*
phone
,
isdn_net_ioctl_phone
__user
*
peer
)
{
{
isdn_net_dev
*
p
=
isdn_net_findif
(
phone
->
name
);
isdn_net_dev
*
p
=
isdn_net_findif
(
phone
->
name
);
int
ch
,
dv
,
idx
;
int
ch
,
dv
,
idx
;
...
...
drivers/isdn/i4l/isdn_net.h
View file @
bec737de
...
@@ -39,8 +39,8 @@ extern int isdn_net_stat_callback(int, isdn_ctrl *);
...
@@ -39,8 +39,8 @@ extern int isdn_net_stat_callback(int, isdn_ctrl *);
extern
int
isdn_net_setcfg
(
isdn_net_ioctl_cfg
*
);
extern
int
isdn_net_setcfg
(
isdn_net_ioctl_cfg
*
);
extern
int
isdn_net_getcfg
(
isdn_net_ioctl_cfg
*
);
extern
int
isdn_net_getcfg
(
isdn_net_ioctl_cfg
*
);
extern
int
isdn_net_addphone
(
isdn_net_ioctl_phone
*
);
extern
int
isdn_net_addphone
(
isdn_net_ioctl_phone
*
);
extern
int
isdn_net_getphones
(
isdn_net_ioctl_phone
*
,
char
*
);
extern
int
isdn_net_getphones
(
isdn_net_ioctl_phone
*
,
char
__user
*
);
extern
int
isdn_net_getpeer
(
isdn_net_ioctl_phone
*
,
isdn_net_ioctl_phone
*
);
extern
int
isdn_net_getpeer
(
isdn_net_ioctl_phone
*
,
isdn_net_ioctl_phone
__user
*
);
extern
int
isdn_net_delphone
(
isdn_net_ioctl_phone
*
);
extern
int
isdn_net_delphone
(
isdn_net_ioctl_phone
*
);
extern
int
isdn_net_find_icall
(
int
,
int
,
int
,
setup_parm
*
);
extern
int
isdn_net_find_icall
(
int
,
int
,
int
,
setup_parm
*
);
extern
void
isdn_net_hangup
(
struct
net_device
*
);
extern
void
isdn_net_hangup
(
struct
net_device
*
);
...
...
drivers/isdn/i4l/isdn_tty.c
View file @
bec737de
...
@@ -1359,14 +1359,14 @@ isdn_tty_unthrottle(struct tty_struct *tty)
...
@@ -1359,14 +1359,14 @@ isdn_tty_unthrottle(struct tty_struct *tty)
* allows RS485 driver to be written in user space.
* allows RS485 driver to be written in user space.
*/
*/
static
int
static
int
isdn_tty_get_lsr_info
(
modem_info
*
info
,
uint
*
value
)
isdn_tty_get_lsr_info
(
modem_info
*
info
,
uint
__user
*
value
)
{
{
u_char
status
;
u_char
status
;
uint
result
;
uint
result
;
status
=
info
->
lsr
;
status
=
info
->
lsr
;
result
=
((
status
&
UART_LSR_TEMT
)
?
TIOCSER_TEMT
:
0
);
result
=
((
status
&
UART_LSR_TEMT
)
?
TIOCSER_TEMT
:
0
);
return
put_user
(
result
,
(
uint
*
)
value
);
return
put_user
(
result
,
value
);
}
}
...
@@ -1468,12 +1468,12 @@ isdn_tty_ioctl(struct tty_struct *tty, struct file *file,
...
@@ -1468,12 +1468,12 @@ isdn_tty_ioctl(struct tty_struct *tty, struct file *file,
#ifdef ISDN_DEBUG_MODEM_IOCTL
#ifdef ISDN_DEBUG_MODEM_IOCTL
printk
(
KERN_DEBUG
"ttyI%d ioctl TIOCGSOFTCAR
\n
"
,
info
->
line
);
printk
(
KERN_DEBUG
"ttyI%d ioctl TIOCGSOFTCAR
\n
"
,
info
->
line
);
#endif
#endif
return
put_user
(
C_CLOCAL
(
tty
)
?
1
:
0
,
(
ulong
*
)
arg
);
return
put_user
(
C_CLOCAL
(
tty
)
?
1
:
0
,
(
ulong
__user
*
)
arg
);
case
TIOCSSOFTCAR
:
case
TIOCSSOFTCAR
:
#ifdef ISDN_DEBUG_MODEM_IOCTL
#ifdef ISDN_DEBUG_MODEM_IOCTL
printk
(
KERN_DEBUG
"ttyI%d ioctl TIOCSSOFTCAR
\n
"
,
info
->
line
);
printk
(
KERN_DEBUG
"ttyI%d ioctl TIOCSSOFTCAR
\n
"
,
info
->
line
);
#endif
#endif
if
(
get_user
(
arg
,
(
ulong
*
)
arg
))
if
(
get_user
(
arg
,
(
ulong
__user
*
)
arg
))
return
-
EFAULT
;
return
-
EFAULT
;
tty
->
termios
->
c_cflag
=
tty
->
termios
->
c_cflag
=
((
tty
->
termios
->
c_cflag
&
~
CLOCAL
)
|
((
tty
->
termios
->
c_cflag
&
~
CLOCAL
)
|
...
...
drivers/isdn/i4l/isdn_x25iface.c
View file @
bec737de
...
@@ -79,7 +79,7 @@ static int pdata_is_bad( ix25_pdata_t * pda ){
...
@@ -79,7 +79,7 @@ static int pdata_is_bad( ix25_pdata_t * pda ){
/* create a new x25 interface protocol instance
/* create a new x25 interface protocol instance
*/
*/
struct
concap_proto
*
isdn_x25iface_proto_new
()
struct
concap_proto
*
isdn_x25iface_proto_new
(
void
)
{
{
ix25_pdata_t
*
tmp
=
kmalloc
(
sizeof
(
ix25_pdata_t
),
GFP_KERNEL
);
ix25_pdata_t
*
tmp
=
kmalloc
(
sizeof
(
ix25_pdata_t
),
GFP_KERNEL
);
IX25DEBUG
(
"isdn_x25iface_proto_new
\n
"
);
IX25DEBUG
(
"isdn_x25iface_proto_new
\n
"
);
...
@@ -275,8 +275,7 @@ int isdn_x25iface_disconn_ind(struct concap_proto *cprot)
...
@@ -275,8 +275,7 @@ int isdn_x25iface_disconn_ind(struct concap_proto *cprot)
int
isdn_x25iface_xmit
(
struct
concap_proto
*
cprot
,
struct
sk_buff
*
skb
)
int
isdn_x25iface_xmit
(
struct
concap_proto
*
cprot
,
struct
sk_buff
*
skb
)
{
{
unsigned
char
firstbyte
=
skb
->
data
[
0
];
unsigned
char
firstbyte
=
skb
->
data
[
0
];
unsigned
*
state
=
enum
wan_states
*
state
=
&
((
ix25_pdata_t
*
)
cprot
->
proto_data
)
->
state
;
&
(
(
(
ix25_pdata_t
*
)
(
cprot
->
proto_data
)
)
->
state
);
int
ret
=
0
;
int
ret
=
0
;
IX25DEBUG
(
"isdn_x25iface_xmit: %s first=%x state=%d
\n
"
,
MY_DEVNAME
(
cprot
->
net_dev
),
firstbyte
,
*
state
);
IX25DEBUG
(
"isdn_x25iface_xmit: %s first=%x state=%d
\n
"
,
MY_DEVNAME
(
cprot
->
net_dev
),
firstbyte
,
*
state
);
switch
(
firstbyte
){
switch
(
firstbyte
){
...
...
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