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
356df99b
Commit
356df99b
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] s390 tape cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t fields.
parent
f8989277
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
45 deletions
+25
-45
drivers/s390/char/tape.c
drivers/s390/char/tape.c
+4
-6
drivers/s390/char/tape.h
drivers/s390/char/tape.h
+0
-12
drivers/s390/char/tapeblock.c
drivers/s390/char/tapeblock.c
+8
-9
drivers/s390/char/tapechar.c
drivers/s390/char/tapechar.c
+13
-18
No files found.
drivers/s390/char/tape.c
View file @
356df99b
...
...
@@ -152,7 +152,6 @@ const char* tape_op_verbose[TO_SIZE] = {
*******************************************************************/
#ifdef CONFIG_DEVFS_FS
devfs_handle_t
tape_devfs_root_entry
;
/*
* Create devfs root entry (devno in hex) for device td
...
...
@@ -163,7 +162,7 @@ tape_mkdevfsroot (tape_dev_t* td)
{
char
devno
[
10
];
sprintf
(
devno
,
"tape/%04x"
,
td
->
devinfo
.
devno
);
return
(
td
->
devfs_dir
=
devfs_mk_dir
(
NULL
,
devno
,
NULL
)
);
return
devfs_mk_dir
(
NULL
,
devno
,
NULL
);
}
/*
...
...
@@ -173,8 +172,7 @@ tape_mkdevfsroot (tape_dev_t* td)
static
inline
void
tape_rmdevfsroot
(
tape_dev_t
*
td
)
{
if
(
td
->
devfs_dir
)
devfs_unregister
(
td
->
devfs_dir
);
devfs_remove
(
"tape/%04x"
,
td
->
devinfo
.
devno
);
}
#endif
...
...
@@ -1715,7 +1713,7 @@ tape_init (void)
tape_split_parm_string
(
tape_parm_string
);
#endif
#ifdef CONFIG_DEVFS_FS
tape_devfs_root_entry
=
devfs_mk_dir
(
NULL
,
"tape"
,
NULL
);
devfs_mk_dir
(
NULL
,
"tape"
,
NULL
);
#endif
/* CONFIG_DEVFS_FS */
tape_sprintf_event
(
tape_dbf_area
,
3
,
"dev detect
\n
"
);
...
...
@@ -1816,7 +1814,7 @@ cleanup_module (void)
tape_sprintf_event
(
tape_dbf_area
,
6
,
"cleaup mod"
);
tape_cleanup_disciplines
();
#ifdef CONFIG_DEVFS_FS
devfs_
unregister
(
tape_devfs_root_entry
);
/* devfs checks for NULL */
devfs_
remove
(
"tape"
);
/* devfs checks for NULL */
#endif CONFIG_DEVFS_FS
#ifdef CONFIG_PROC_FS
tape_proc_cleanup
();
...
...
drivers/s390/char/tape.h
View file @
356df99b
...
...
@@ -183,11 +183,6 @@ typedef struct _tape_frontend_t {
typedef
struct
_tape_char_front_data_t
{
int
block_size
;
/* block size of tape */
#ifdef CONFIG_DEVFS_FS
devfs_handle_t
devfs_char_dir
;
/* tape/DEVNO/char dir */
devfs_handle_t
devfs_nonrewinding
;
/* tape/DEVNO/char/nonrewinding */
devfs_handle_t
devfs_rewinding
;
/* tape/DEVNO/char/rewinding */
#endif
/* CONFIG_DEVFS_FS */
}
tape_char_data_t
;
/* Block Frontend Data */
...
...
@@ -199,10 +194,6 @@ typedef struct _tape_blk_front_data_t{
long
position
;
atomic_t
bh_scheduled
;
struct
tq_struct
bh_tq
;
#ifdef CONFIG_DEVFS_FS
devfs_handle_t
devfs_block_dir
;
/* tape/DEVNO/block dir */
devfs_handle_t
devfs_disc
;
/* tape/DEVNO/block/disc */
#endif
/* CONFIG_DEVFS_FS */
}
tape_blk_data_t
;
/* Tape Info */
...
...
@@ -220,9 +211,6 @@ typedef struct _tape_dev_t {
tape_ccw_req_t
*
treq
;
/* Active Tape request */
tape_op_t
last_op
;
/* Last Tape operation */
void
*
next
;
/* ptr to next tape_dev */
#ifdef CONFIG_DEVFS_FS
devfs_handle_t
devfs_dir
;
/* toplevel devfs dir */
#endif
/* CONFIG_DEVFS_FS */
tape_char_data_t
char_data
;
/* Character dev frontend data */
tape_blk_data_t
blk_data
;
/* Block dev frontend data */
}
tape_dev_t
__attribute__
((
aligned
(
8
)));
...
...
drivers/s390/char/tapeblock.c
View file @
356df99b
...
...
@@ -48,11 +48,12 @@ static request_queue_t* tapeblock_getqueue (kdev_t kdev);
devfs_handle_t
tapeblock_mkdevfstree
(
tape_dev_t
*
td
)
{
devfs_handle_t
rc
=
NULL
;
char
name
[
16
];
char
name
[
32
];
sprintf
(
name
,
"tape/%04x/block"
,
td
->
devinfo
.
devno
);
rc
=
td
->
blk_data
.
devfs_block_dir
=
devfs_mk_dir
(
NULL
,
name
,
NULL
);
rc
=
devfs_mk_dir
(
NULL
,
name
,
NULL
);
if
(
rc
==
NULL
)
goto
out_undo
;
rc
=
td
->
blk_data
.
devfs_disc
=
devfs_register
(
td
->
blk_data
.
devfs_block_dir
,
"disc"
,
DEVFS_FL_DEFAULT
,
sprintf
(
name
,
"tape/%04x/block/disc"
,
td
->
devinfo
.
devno
);
rc
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
tapeblock_major
,
td
->
first_minor
,
TAPEBLOCK_DEVFSMODE
,
&
tapeblock_fops
,
td
);
if
(
rc
==
NULL
)
goto
out_undo
;
...
...
@@ -65,10 +66,8 @@ tapeblock_mkdevfstree (tape_dev_t* td) {
void
tapeblock_rmdevfstree
(
tape_dev_t
*
td
)
{
if
(
td
->
blk_data
.
devfs_disc
)
devfs_unregister
(
td
->
blk_data
.
devfs_disc
);
if
(
td
->
blk_data
.
devfs_block_dir
)
devfs_unregister
(
td
->
blk_data
.
devfs_block_dir
);
devfs_remove
(
"tape/%04x/block/disc"
,
td
->
devinfo
.
devno
);
devfs_remove
(
"tape/%04x/block"
,
td
->
devinfo
.
devno
);
}
#endif
...
...
drivers/s390/char/tapechar.c
View file @
356df99b
...
...
@@ -63,19 +63,17 @@ int tapechar_major = TAPECHAR_MAJOR;
devfs_handle_t
tapechar_mkdevfstree
(
tape_dev_t
*
td
)
{
devfs_handle_t
rc
=
NULL
;
char
name
[
15
];
char
name
[
32
];
sprintf
(
name
,
"tape/%04x/char"
,
td
->
devinfo
.
devno
);
rc
=
td
->
char_data
.
devfs_char_dir
=
devfs_mk_dir
(
NULL
,
name
,
NULL
);
rc
=
devfs_mk_dir
(
NULL
,
name
,
NULL
);
if
(
rc
==
NULL
)
goto
out_undo
;
rc
=
td
->
char_data
.
devfs_nonrewinding
=
devfs_register
(
td
->
char_data
.
devfs_char_dir
,
"nonrewinding"
,
DEVFS_FL_DEFAULT
,
tapechar_major
,
sprintf
(
name
,
"tape/%04x/char/nonrewinding"
,
td
->
devinfo
.
devno
);
rc
=
devfs_register
(
NULL
.
name
.
DEVFS_FL_DEFAULT
,
tapechar_major
,
TAPECHAR_NOREW_MINOR
(
td
->
first_minor
),
TAPECHAR_DEVFSMODE
,
&
tape_fops
,
td
);
if
(
rc
==
NULL
)
goto
out_undo
;
rc
=
td
->
char_data
.
devfs_rewinding
=
devfs_register
(
td
->
char_data
.
devfs_char_dir
,
"rewinding"
,
DEVFS_FL_DEFAULT
,
tapechar_major
,
sprintf
(
name
,
"tape/%04x/char/rewinding"
,
td
->
devinfo
.
devno
);
rc
=
devfs_register
(
NULL
.
name
,
DEVFS_FL_DEFAULT
,
tapechar_major
,
TAPECHAR_REW_MINOR
(
td
->
first_minor
),
TAPECHAR_DEVFSMODE
,
&
tape_fops
,
td
);
if
(
rc
==
NULL
)
goto
out_undo
;
...
...
@@ -92,12 +90,9 @@ tapechar_mkdevfstree (tape_dev_t* td) {
void
tapechar_rmdevfstree
(
tape_dev_t
*
td
)
{
if
(
td
->
char_data
.
devfs_nonrewinding
)
devfs_unregister
(
td
->
char_data
.
devfs_nonrewinding
);
if
(
td
->
char_data
.
devfs_rewinding
)
devfs_unregister
(
td
->
char_data
.
devfs_rewinding
);
if
(
td
->
char_data
.
devfs_char_dir
)
devfs_unregister
(
td
->
char_data
.
devfs_char_dir
);
devfs_remove
(
"tape/%04x/char/nonrewinding"
,
td
->
devinfo
.
devno
);
devfs_remove
(
"tape/%04x/char/rewinding"
,
td
->
devinfo
.
devno
);
devfs_remove
(
"tape/%04x/char"
,
td
->
devinfo
.
devno
);
}
#endif
...
...
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