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
32feff07
Commit
32feff07
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] lp cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t variable.
parent
6eb9e1b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
drivers/char/lp.c
drivers/char/lp.c
+6
-7
No files found.
drivers/char/lp.c
View file @
32feff07
...
...
@@ -141,8 +141,6 @@
/* ROUND_UP macro from fs/select.c */
#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
static
devfs_handle_t
devfs_handle
=
NULL
;
struct
lp_struct
lp_table
[
LP_NO
];
static
unsigned
int
lp_count
=
0
;
...
...
@@ -792,7 +790,7 @@ static int __init lp_setup (char *str)
static
int
lp_register
(
int
nr
,
struct
parport
*
port
)
{
char
name
[
8
];
char
name
[
16
];
lp_table
[
nr
].
dev
=
parport_register_device
(
port
,
"lp"
,
lp_preempt
,
NULL
,
NULL
,
0
,
...
...
@@ -804,8 +802,8 @@ static int lp_register(int nr, struct parport *port)
if
(
reset
)
lp_reset
(
nr
);
sprintf
(
name
,
"%d"
,
nr
);
devfs_register
(
devfs_handle
,
name
,
sprintf
(
name
,
"
printers/
%d"
,
nr
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
LP_MAJOR
,
nr
,
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
&
lp_fops
,
NULL
);
...
...
@@ -908,7 +906,7 @@ int __init lp_init (void)
return
-
EIO
;
}
devfs_
handle
=
devfs_
mk_dir
(
NULL
,
"printers"
,
NULL
);
devfs_mk_dir
(
NULL
,
"printers"
,
NULL
);
if
(
parport_register_driver
(
&
lp_driver
))
{
printk
(
KERN_ERR
"lp: unable to register with parport
\n
"
);
...
...
@@ -964,13 +962,14 @@ static void lp_cleanup_module (void)
unregister_console
(
&
lpcons
);
#endif
devfs_unregister
(
devfs_handle
);
unregister_chrdev
(
LP_MAJOR
,
"lp"
);
for
(
offset
=
0
;
offset
<
LP_NO
;
offset
++
)
{
if
(
lp_table
[
offset
].
dev
==
NULL
)
continue
;
parport_unregister_device
(
lp_table
[
offset
].
dev
);
devfs_remove
(
"printers/%d"
,
offset
);
}
devfs_remove
(
"printers"
);
}
__setup
(
"lp="
,
lp_setup
);
...
...
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