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
e7f0ba55
Commit
e7f0ba55
authored
Mar 19, 2004
by
Kai Mäkisara
Committed by
James Bottomley
Mar 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Fix SCSI + st regressions problem
remove dependency on kobj.name.
parent
72a3b209
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
drivers/scsi/st.c
drivers/scsi/st.c
+10
-5
No files found.
drivers/scsi/st.c
View file @
e7f0ba55
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
*/
*/
static
char
*
verstr
=
"20040
226
"
;
static
char
*
verstr
=
"20040
318
"
;
#include <linux/module.h>
#include <linux/module.h>
...
@@ -4193,20 +4193,25 @@ CLASS_DEVICE_ATTR(default_compression, S_IRUGO, st_defcompression_show, NULL);
...
@@ -4193,20 +4193,25 @@ CLASS_DEVICE_ATTR(default_compression, S_IRUGO, st_defcompression_show, NULL);
static
void
do_create_class_files
(
Scsi_Tape
*
STp
,
int
dev_num
,
int
mode
)
static
void
do_create_class_files
(
Scsi_Tape
*
STp
,
int
dev_num
,
int
mode
)
{
{
int
rew
,
error
;
int
i
,
rew
,
error
;
char
name
[
10
];
struct
class_device
*
st_class_member
;
struct
class_device
*
st_class_member
;
if
(
!
st_sysfs_class
)
if
(
!
st_sysfs_class
)
return
;
return
;
for
(
rew
=
0
;
rew
<
2
;
rew
++
)
{
for
(
rew
=
0
;
rew
<
2
;
rew
++
)
{
/* Make sure that the minor numbers corresponding to the four
first modes always get the same names */
i
=
mode
<<
(
4
-
ST_NBR_MODE_BITS
);
snprintf
(
name
,
10
,
"%s%s%s"
,
rew
?
"n"
:
""
,
STp
->
disk
->
disk_name
,
st_formats
[
i
]);
st_class_member
=
st_class_member
=
class_simple_device_add
(
st_sysfs_class
,
class_simple_device_add
(
st_sysfs_class
,
MKDEV
(
SCSI_TAPE_MAJOR
,
MKDEV
(
SCSI_TAPE_MAJOR
,
TAPE_MINOR
(
dev_num
,
mode
,
rew
)),
TAPE_MINOR
(
dev_num
,
mode
,
rew
)),
&
STp
->
device
->
sdev_gendev
,
"%s"
,
&
STp
->
device
->
sdev_gendev
,
"%s"
,
name
);
STp
->
modes
[
mode
].
cdevs
[
rew
]
->
kobj
.
name
);
if
(
IS_ERR
(
st_class_member
))
{
if
(
!
st_class_member
)
{
printk
(
KERN_WARNING
"st%d: class_simple_device_add failed
\n
"
,
printk
(
KERN_WARNING
"st%d: class_simple_device_add failed
\n
"
,
dev_num
);
dev_num
);
goto
out
;
goto
out
;
...
...
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