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
e752c144
Commit
e752c144
authored
Dec 03, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Dec 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] isdn cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t fields.
parent
5781aaf2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
59 deletions
+33
-59
drivers/isdn/hardware/eicon/divamnt.c
drivers/isdn/hardware/eicon/divamnt.c
+4
-8
drivers/isdn/hardware/eicon/divasi.c
drivers/isdn/hardware/eicon/divasi.c
+4
-8
drivers/isdn/hardware/eicon/divasmain.c
drivers/isdn/hardware/eicon/divasmain.c
+3
-7
drivers/isdn/i4l/isdn_common.c
drivers/isdn/i4l/isdn_common.c
+22
-28
include/linux/isdn.h
include/linux/isdn.h
+0
-8
No files found.
drivers/isdn/hardware/eicon/divamnt.c
View file @
e752c144
...
@@ -51,8 +51,6 @@ static char *DRIVERNAME =
...
@@ -51,8 +51,6 @@ static char *DRIVERNAME =
static
char
*
DRIVERLNAME
=
"diva_mnt"
;
static
char
*
DRIVERLNAME
=
"diva_mnt"
;
char
*
DRIVERRELEASE
=
"2.0"
;
char
*
DRIVERRELEASE
=
"2.0"
;
static
devfs_handle_t
devfs_handle
;
static
wait_queue_head_t
msgwaitq
;
static
wait_queue_head_t
msgwaitq
;
static
DECLARE_MUTEX
(
opened_sem
);
static
DECLARE_MUTEX
(
opened_sem
);
static
int
opened
;
static
int
opened
;
...
@@ -412,8 +410,7 @@ static struct file_operations divas_maint_fops = {
...
@@ -412,8 +410,7 @@ static struct file_operations divas_maint_fops = {
static
void
divas_maint_unregister_chrdev
(
void
)
static
void
divas_maint_unregister_chrdev
(
void
)
{
{
if
(
devfs_handle
)
devfs_remove
(
"DivasMAINT"
);
devfs_unregister
(
devfs_handle
);
unregister_chrdev
(
major
,
"DivasMAINT"
);
unregister_chrdev
(
major
,
"DivasMAINT"
);
}
}
...
@@ -425,10 +422,9 @@ static int DIVA_INIT_FUNCTION divas_maint_register_chrdev(void)
...
@@ -425,10 +422,9 @@ static int DIVA_INIT_FUNCTION divas_maint_register_chrdev(void)
DRIVERLNAME
);
DRIVERLNAME
);
return
(
0
);
return
(
0
);
}
}
devfs_handle
=
devfs_register
(
NULL
,
"DivasMAINT"
,
DEVFS_FL_DEFAULT
,
major
,
0
,
devfs_register
(
NULL
,
"DivasMAINT"
,
DEVFS_FL_DEFAULT
,
major
,
0
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
divas_maint_fops
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
divas_maint_fops
,
NULL
);
NULL
);
return
(
1
);
return
(
1
);
}
}
...
...
drivers/isdn/hardware/eicon/divasi.c
View file @
e752c144
...
@@ -52,8 +52,6 @@ static char *DRIVERNAME = "Eicon DIVA - User IDI (http://www.melware.net)";
...
@@ -52,8 +52,6 @@ static char *DRIVERNAME = "Eicon DIVA - User IDI (http://www.melware.net)";
static
char
*
DRIVERLNAME
=
"diva_idi"
;
static
char
*
DRIVERLNAME
=
"diva_idi"
;
char
*
DRIVERRELEASE
=
"2.0"
;
char
*
DRIVERRELEASE
=
"2.0"
;
static
devfs_handle_t
devfs_handle
;
extern
int
idifunc_init
(
void
);
extern
int
idifunc_init
(
void
);
extern
void
idifunc_finit
(
void
);
extern
void
idifunc_finit
(
void
);
...
@@ -171,8 +169,7 @@ static struct file_operations divas_idi_fops = {
...
@@ -171,8 +169,7 @@ static struct file_operations divas_idi_fops = {
static
void
divas_idi_unregister_chrdev
(
void
)
static
void
divas_idi_unregister_chrdev
(
void
)
{
{
if
(
devfs_handle
)
devfs_remove
(
"DivasIDI"
);
devfs_unregister
(
devfs_handle
);
unregister_chrdev
(
major
,
"DivasIDI"
);
unregister_chrdev
(
major
,
"DivasIDI"
);
}
}
...
@@ -184,10 +181,9 @@ static int DIVA_INIT_FUNCTION divas_idi_register_chrdev(void)
...
@@ -184,10 +181,9 @@ static int DIVA_INIT_FUNCTION divas_idi_register_chrdev(void)
DRIVERLNAME
);
DRIVERLNAME
);
return
(
0
);
return
(
0
);
}
}
devfs_handle
=
devfs_register
(
NULL
,
"DivasIDI"
,
DEVFS_FL_DEFAULT
,
major
,
0
,
devfs_register
(
NULL
,
"DivasIDI"
,
DEVFS_FL_DEFAULT
,
major
,
0
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
divas_idi_fops
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
divas_idi_fops
,
NULL
);
NULL
);
return
(
1
);
return
(
1
);
}
}
...
...
drivers/isdn/hardware/eicon/divasmain.c
View file @
e752c144
...
@@ -70,8 +70,6 @@ extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
...
@@ -70,8 +70,6 @@ extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
extern
int
divasfunc_init
(
void
);
extern
int
divasfunc_init
(
void
);
extern
void
divasfunc_exit
(
void
);
extern
void
divasfunc_exit
(
void
);
static
devfs_handle_t
devfs_handle
;
typedef
struct
_diva_os_thread_dpc
{
typedef
struct
_diva_os_thread_dpc
{
struct
tasklet_struct
divas_task
;
struct
tasklet_struct
divas_task
;
struct
work_struct
trap_script_task
;
struct
work_struct
trap_script_task
;
...
@@ -779,8 +777,7 @@ static struct file_operations divas_fops = {
...
@@ -779,8 +777,7 @@ static struct file_operations divas_fops = {
static
void
divas_unregister_chrdev
(
void
)
static
void
divas_unregister_chrdev
(
void
)
{
{
if
(
devfs_handle
)
devfs_remove
(
"Divas"
);
devfs_unregister
(
devfs_handle
);
unregister_chrdev
(
major
,
"Divas"
);
unregister_chrdev
(
major
,
"Divas"
);
}
}
...
@@ -792,9 +789,8 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void)
...
@@ -792,9 +789,8 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void)
DRIVERLNAME
);
DRIVERLNAME
);
return
(
0
);
return
(
0
);
}
}
devfs_handle
=
devfs_register
(
NULL
,
"Divas"
,
DEVFS_FL_DEFAULT
,
major
,
0
,
devfs_register
(
NULL
,
"Divas"
,
DEVFS_FL_DEFAULT
,
major
,
0
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
divas_fops
,
NULL
);
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
divas_fops
,
NULL
);
return
(
1
);
return
(
1
);
}
}
...
...
drivers/isdn/i4l/isdn_common.c
View file @
e752c144
...
@@ -2165,22 +2165,19 @@ isdn_hard_header_len(void)
...
@@ -2165,22 +2165,19 @@ isdn_hard_header_len(void)
#ifdef CONFIG_DEVFS_FS
#ifdef CONFIG_DEVFS_FS
static
devfs_handle_t
devfs_handle
;
static
void
isdn_register_devfs
(
int
k
)
static
void
isdn_register_devfs
(
int
k
)
{
{
char
buf
[
1
1
];
char
buf
[
1
6
];
sprintf
(
buf
,
"isdnctrl%d"
,
k
);
sprintf
(
buf
,
"isdn/isdnctrl%d"
,
k
);
dev
->
devfs_handle_isdnctrlX
[
k
]
=
devfs_register
(
NULL
,
buf
,
DEVFS_FL_DEFAULT
,
devfs_register
(
devfs_handle
,
buf
,
DEVFS_FL_DEFAULT
,
ISDN_MAJOR
,
ISDN_MINOR_CTRL
+
k
,
0600
|
S_IFCHR
,
ISDN_MAJOR
,
ISDN_MINOR_CTRL
+
k
,
0600
|
S_IFCHR
,
&
isdn_fops
,
NULL
);
&
isdn_fops
,
NULL
);
}
}
static
void
isdn_unregister_devfs
(
int
k
)
static
void
isdn_unregister_devfs
(
int
k
)
{
{
devfs_
unregister
(
dev
->
devfs_handle_isdnctrlX
[
k
]
);
devfs_
remove
(
"isdn/isdnctrl%d"
,
k
);
}
}
static
void
isdn_init_devfs
(
void
)
static
void
isdn_init_devfs
(
void
)
...
@@ -2189,27 +2186,24 @@ static void isdn_init_devfs(void)
...
@@ -2189,27 +2186,24 @@ static void isdn_init_devfs(void)
int
i
;
int
i
;
# endif
# endif
devfs_
handle
=
devfs_
mk_dir
(
NULL
,
"isdn"
,
NULL
);
devfs_mk_dir
(
NULL
,
"isdn"
,
NULL
);
# ifdef CONFIG_ISDN_PPP
# ifdef CONFIG_ISDN_PPP
for
(
i
=
0
;
i
<
ISDN_MAX_CHANNELS
;
i
++
)
{
for
(
i
=
0
;
i
<
ISDN_MAX_CHANNELS
;
i
++
)
{
char
buf
[
8
];
char
buf
[
16
];
sprintf
(
buf
,
"ippp%d"
,
i
);
sprintf
(
buf
,
"isdn/ippp%d"
,
i
);
dev
->
devfs_handle_ipppX
[
i
]
=
devfs_register
(
NULL
,
buf
,
DEVFS_FL_DEFAULT
,
devfs_register
(
devfs_handle
,
buf
,
DEVFS_FL_DEFAULT
,
ISDN_MAJOR
,
ISDN_MINOR_PPP
+
i
,
ISDN_MAJOR
,
ISDN_MINOR_PPP
+
i
,
0600
|
S_IFCHR
,
&
isdn_fops
,
NULL
);
0600
|
S_IFCHR
,
&
isdn_fops
,
NULL
);
}
}
# endif
# endif
dev
->
devfs_handle_isdninfo
=
devfs_register
(
NULL
,
"isdn/isdninfo"
,
DEVFS_FL_DEFAULT
,
devfs_register
(
devfs_handle
,
"isdninfo"
,
DEVFS_FL_DEFAULT
,
ISDN_MAJOR
,
ISDN_MINOR_STATUS
,
0600
|
S_IFCHR
,
ISDN_MAJOR
,
ISDN_MINOR_STATUS
,
0600
|
S_IFCHR
,
&
isdn_fops
,
NULL
);
&
isdn_fops
,
NULL
);
devfs_register
(
NULL
,
"isdn/isdnctrl"
,
DEVFS_FL_DEFAULT
,
dev
->
devfs_handle_isdnctrl
=
ISDN_MAJOR
,
ISDN_MINOR_CTRL
,
0600
|
S_IFCHR
,
devfs_register
(
devfs_handle
,
"isdnctrl"
,
DEVFS_FL_DEFAULT
,
&
isdn_fops
,
NULL
);
ISDN_MAJOR
,
ISDN_MINOR_CTRL
,
0600
|
S_IFCHR
,
&
isdn_fops
,
NULL
);
}
}
static
void
isdn_cleanup_devfs
(
void
)
static
void
isdn_cleanup_devfs
(
void
)
...
@@ -2217,11 +2211,11 @@ static void isdn_cleanup_devfs(void)
...
@@ -2217,11 +2211,11 @@ static void isdn_cleanup_devfs(void)
# ifdef CONFIG_ISDN_PPP
# ifdef CONFIG_ISDN_PPP
int
i
;
int
i
;
for
(
i
=
0
;
i
<
ISDN_MAX_CHANNELS
;
i
++
)
for
(
i
=
0
;
i
<
ISDN_MAX_CHANNELS
;
i
++
)
devfs_
unregister
(
dev
->
devfs_handle_ipppX
[
i
]
);
devfs_
remove
(
"isdn/ippp%d"
,
i
);
# endif
# endif
devfs_
unregister
(
dev
->
devfs_handle_isdninfo
);
devfs_
remove
(
"isdn/isdninfo"
);
devfs_
unregister
(
dev
->
devfs_handle_isdnctrl
);
devfs_
remove
(
"isdn/isdnctrl"
);
devfs_
unregister
(
devfs_handle
);
devfs_
remove
(
"isdn"
);
}
}
#else
/* CONFIG_DEVFS_FS */
#else
/* CONFIG_DEVFS_FS */
...
...
include/linux/isdn.h
View file @
e752c144
...
@@ -408,14 +408,6 @@ typedef struct isdn_devt {
...
@@ -408,14 +408,6 @@ typedef struct isdn_devt {
struct
task_struct
*
profd
;
/* For iprofd */
struct
task_struct
*
profd
;
/* For iprofd */
struct
semaphore
sem
;
/* serialize list access*/
struct
semaphore
sem
;
/* serialize list access*/
unsigned
long
global_features
;
unsigned
long
global_features
;
#ifdef CONFIG_DEVFS_FS
devfs_handle_t
devfs_handle_isdninfo
;
devfs_handle_t
devfs_handle_isdnctrl
;
devfs_handle_t
devfs_handle_isdnctrlX
[
ISDN_MAX_CHANNELS
];
#ifdef CONFIG_ISDN_PPP
devfs_handle_t
devfs_handle_ipppX
[
ISDN_MAX_CHANNELS
];
#endif
#endif
/* CONFIG_DEVFS_FS */
}
isdn_dev
;
}
isdn_dev
;
extern
isdn_dev
*
dev
;
extern
isdn_dev
*
dev
;
...
...
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