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
34f1e874
Commit
34f1e874
authored
Oct 28, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge by hand hch driverfs changes and hch sd cleanup
parents
bd24aecd
07152268
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
34 deletions
+10
-34
drivers/scsi/hosts.h
drivers/scsi/hosts.h
+0
-3
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+7
-0
drivers/scsi/sd.c
drivers/scsi/sd.c
+0
-4
drivers/scsi/sg.c
drivers/scsi/sg.c
+1
-10
drivers/scsi/sr.c
drivers/scsi/sr.c
+1
-9
drivers/scsi/st.c
drivers/scsi/st.c
+1
-8
No files found.
drivers/scsi/hosts.h
View file @
34f1e874
...
@@ -541,9 +541,6 @@ static inline void scsi_set_pci_device(struct Scsi_Host *shost,
...
@@ -541,9 +541,6 @@ static inline void scsi_set_pci_device(struct Scsi_Host *shost,
{
{
shost
->
pci_dev
=
pdev
;
shost
->
pci_dev
=
pdev
;
shost
->
host_driverfs_dev
.
parent
=&
pdev
->
dev
;
shost
->
host_driverfs_dev
.
parent
=&
pdev
->
dev
;
/* register parent with driverfs */
device_register
(
&
shost
->
host_driverfs_dev
);
}
}
...
...
drivers/scsi/scsi.c
View file @
34f1e874
...
@@ -1996,6 +1996,11 @@ int scsi_register_device(struct Scsi_Device_Template *tpnt)
...
@@ -1996,6 +1996,11 @@ int scsi_register_device(struct Scsi_Device_Template *tpnt)
tpnt
->
next
=
scsi_devicelist
;
tpnt
->
next
=
scsi_devicelist
;
scsi_devicelist
=
tpnt
;
scsi_devicelist
=
tpnt
;
tpnt
->
scsi_driverfs_driver
.
name
=
(
char
*
)
tpnt
->
tag
;
tpnt
->
scsi_driverfs_driver
.
bus
=
&
scsi_driverfs_bus_type
;
driver_register
(
&
tpnt
->
scsi_driverfs_driver
);
/*
/*
* First scan the devices that we know about, and see if we notice them.
* First scan the devices that we know about, and see if we notice them.
*/
*/
...
@@ -2067,6 +2072,8 @@ int scsi_unregister_device(struct Scsi_Device_Template *tpnt)
...
@@ -2067,6 +2072,8 @@ int scsi_unregister_device(struct Scsi_Device_Template *tpnt)
if
(
GET_USE_COUNT
(
tpnt
->
module
)
!=
0
)
if
(
GET_USE_COUNT
(
tpnt
->
module
)
!=
0
)
goto
error_out
;
goto
error_out
;
driver_unregister
(
&
tpnt
->
scsi_driverfs_driver
);
/*
/*
* Next, detach the devices from the driver.
* Next, detach the devices from the driver.
*/
*/
...
...
drivers/scsi/sd.c
View file @
34f1e874
...
@@ -1334,7 +1334,6 @@ static int __init init_sd(void)
...
@@ -1334,7 +1334,6 @@ static int __init init_sd(void)
SD_MAJOR
(
i
));
SD_MAJOR
(
i
));
else
else
majors
++
;
majors
++
;
}
if
(
!
majors
)
if
(
!
majors
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -1342,9 +1341,6 @@ static int __init init_sd(void)
...
@@ -1342,9 +1341,6 @@ static int __init init_sd(void)
rc
=
scsi_register_device
(
&
sd_template
);
rc
=
scsi_register_device
(
&
sd_template
);
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
sd_template
.
scsi_driverfs_driver
.
name
=
(
char
*
)
sd_template
.
tag
;
sd_template
.
scsi_driverfs_driver
.
bus
=
&
scsi_driverfs_bus_type
;
driver_register
(
&
sd_template
.
scsi_driverfs_driver
);
register_reboot_notifier
(
&
sd_notifier_block
);
register_reboot_notifier
(
&
sd_notifier_block
);
return
rc
;
return
rc
;
}
}
...
...
drivers/scsi/sg.c
View file @
34f1e874
...
@@ -1629,17 +1629,9 @@ MODULE_PARM_DESC(def_reserved_size, "size of buffer reserved for each fd");
...
@@ -1629,17 +1629,9 @@ MODULE_PARM_DESC(def_reserved_size, "size of buffer reserved for each fd");
static
int
__init
static
int
__init
init_sg
(
void
)
init_sg
(
void
)
{
{
int
rc
;
if
(
def_reserved_size
>=
0
)
if
(
def_reserved_size
>=
0
)
sg_big_buff
=
def_reserved_size
;
sg_big_buff
=
def_reserved_size
;
rc
=
scsi_register_device
(
&
sg_template
);
return
scsi_register_device
(
&
sg_template
);
if
(
!
rc
)
{
sg_template
.
scsi_driverfs_driver
.
name
=
(
char
*
)
sg_template
.
tag
;
sg_template
.
scsi_driverfs_driver
.
bus
=
&
scsi_driverfs_bus_type
;
driver_register
(
&
sg_template
.
scsi_driverfs_driver
);
}
return
rc
;
}
}
static
void
__exit
static
void
__exit
...
@@ -1655,7 +1647,6 @@ exit_sg(void)
...
@@ -1655,7 +1647,6 @@ exit_sg(void)
sg_dev_arr
=
NULL
;
sg_dev_arr
=
NULL
;
}
}
sg_template
.
dev_max
=
0
;
sg_template
.
dev_max
=
0
;
driver_unregister
(
&
sg_template
.
scsi_driverfs_driver
);
}
}
static
int
static
int
...
...
drivers/scsi/sr.c
View file @
34f1e874
...
@@ -838,14 +838,7 @@ static void sr_detach(struct scsi_device * SDp)
...
@@ -838,14 +838,7 @@ static void sr_detach(struct scsi_device * SDp)
static
int
__init
init_sr
(
void
)
static
int
__init
init_sr
(
void
)
{
{
int
rc
;
return
scsi_register_device
(
&
sr_template
);
rc
=
scsi_register_device
(
&
sr_template
);
if
(
!
rc
)
{
sr_template
.
scsi_driverfs_driver
.
name
=
(
char
*
)
sr_template
.
tag
;
sr_template
.
scsi_driverfs_driver
.
bus
=
&
scsi_driverfs_bus_type
;
driver_register
(
&
sr_template
.
scsi_driverfs_driver
);
}
return
rc
;
}
}
static
void
__exit
exit_sr
(
void
)
static
void
__exit
exit_sr
(
void
)
...
@@ -857,7 +850,6 @@ static void __exit exit_sr(void)
...
@@ -857,7 +850,6 @@ static void __exit exit_sr(void)
kfree
(
scsi_CDs
);
kfree
(
scsi_CDs
);
sr_template
.
dev_max
=
0
;
sr_template
.
dev_max
=
0
;
driver_unregister
(
&
sr_template
.
scsi_driverfs_driver
);
}
}
module_init
(
init_sr
);
module_init
(
init_sr
);
...
...
drivers/scsi/st.c
View file @
34f1e874
...
@@ -3965,14 +3965,8 @@ static int __init init_st(void)
...
@@ -3965,14 +3965,8 @@ static int __init init_st(void)
st_max_sg_segs
);
st_max_sg_segs
);
if
(
register_chrdev
(
SCSI_TAPE_MAJOR
,
"st"
,
&
st_fops
)
>=
0
)
{
if
(
register_chrdev
(
SCSI_TAPE_MAJOR
,
"st"
,
&
st_fops
)
>=
0
)
{
if
(
scsi_register_device
(
&
st_template
)
==
0
)
{
if
(
scsi_register_device
(
&
st_template
)
==
0
)
st_template
.
scsi_driverfs_driver
.
name
=
(
char
*
)
st_template
.
tag
;
st_template
.
scsi_driverfs_driver
.
bus
=
&
scsi_driverfs_bus_type
;
driver_register
(
&
st_template
.
scsi_driverfs_driver
);
return
0
;
return
0
;
}
}
}
printk
(
KERN_ERR
"Unable to get major %d for SCSI tapes
\n
"
,
MAJOR_NR
);
printk
(
KERN_ERR
"Unable to get major %d for SCSI tapes
\n
"
,
MAJOR_NR
);
...
@@ -3992,7 +3986,6 @@ static void __exit exit_st(void)
...
@@ -3992,7 +3986,6 @@ static void __exit exit_st(void)
kfree
(
scsi_tapes
);
kfree
(
scsi_tapes
);
}
}
st_template
.
dev_max
=
0
;
st_template
.
dev_max
=
0
;
driver_unregister
(
&
st_template
.
scsi_driverfs_driver
);
printk
(
KERN_INFO
"st: Unloaded.
\n
"
);
printk
(
KERN_INFO
"st: Unloaded.
\n
"
);
}
}
...
...
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