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