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
bd877aaf
Commit
bd877aaf
authored
Feb 19, 2004
by
Bartlomiej Zolnierkiewicz
Committed by
Linus Torvalds
Feb 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill useless IDE_SUBDRIVER_VERSION
parent
ff7e1b28
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
17 deletions
+13
-17
drivers/ide/ide-cd.c
drivers/ide/ide-cd.c
+1
-1
drivers/ide/ide-default.c
drivers/ide/ide-default.c
+1
-2
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+1
-1
drivers/ide/ide-floppy.c
drivers/ide/ide-floppy.c
+1
-1
drivers/ide/ide-tape.c
drivers/ide/ide-tape.c
+1
-1
drivers/ide/ide.c
drivers/ide/ide.c
+6
-6
drivers/scsi/ide-scsi.c
drivers/scsi/ide-scsi.c
+1
-2
include/linux/ide.h
include/linux/ide.h
+1
-3
No files found.
drivers/ide/ide-cd.c
View file @
bd877aaf
...
...
@@ -3517,7 +3517,7 @@ static int ide_cdrom_attach (ide_drive_t *drive)
printk
(
"%s: Can't allocate a cdrom structure
\n
"
,
drive
->
name
);
goto
failed
;
}
if
(
ide_register_subdriver
(
drive
,
&
ide_cdrom_driver
,
IDE_SUBDRIVER_VERSION
))
{
if
(
ide_register_subdriver
(
drive
,
&
ide_cdrom_driver
))
{
printk
(
"%s: Failed to register the driver with ide.c
\n
"
,
drive
->
name
);
kfree
(
info
);
...
...
drivers/ide/ide-default.c
View file @
bd877aaf
...
...
@@ -51,8 +51,7 @@ ide_driver_t idedefault_driver = {
static
int
idedefault_attach
(
ide_drive_t
*
drive
)
{
if
(
ide_register_subdriver
(
drive
,
&
idedefault_driver
,
IDE_SUBDRIVER_VERSION
))
{
if
(
ide_register_subdriver
(
drive
,
&
idedefault_driver
))
{
printk
(
KERN_ERR
"ide-default: %s: Failed to register the "
"driver with ide.c
\n
"
,
drive
->
name
);
return
1
;
...
...
drivers/ide/ide-disk.c
View file @
bd877aaf
...
...
@@ -1829,7 +1829,7 @@ static int idedisk_attach(ide_drive_t *drive)
if
(
drive
->
media
!=
ide_disk
)
goto
failed
;
if
(
ide_register_subdriver
(
drive
,
&
idedisk_driver
,
IDE_SUBDRIVER_VERSION
))
{
if
(
ide_register_subdriver
(
drive
,
&
idedisk_driver
))
{
printk
(
KERN_ERR
"ide-disk: %s: Failed to register the driver with ide.c
\n
"
,
drive
->
name
);
goto
failed
;
}
...
...
drivers/ide/ide-floppy.c
View file @
bd877aaf
...
...
@@ -2055,7 +2055,7 @@ static int idefloppy_attach (ide_drive_t *drive)
printk
(
KERN_ERR
"ide-floppy: %s: Can't allocate a floppy structure
\n
"
,
drive
->
name
);
goto
failed
;
}
if
(
ide_register_subdriver
(
drive
,
&
idefloppy_driver
,
IDE_SUBDRIVER_VERSION
))
{
if
(
ide_register_subdriver
(
drive
,
&
idefloppy_driver
))
{
printk
(
KERN_ERR
"ide-floppy: %s: Failed to register the driver with ide.c
\n
"
,
drive
->
name
);
kfree
(
floppy
);
goto
failed
;
...
...
drivers/ide/ide-tape.c
View file @
bd877aaf
...
...
@@ -4854,7 +4854,7 @@ static int idetape_attach (ide_drive_t *drive)
printk
(
KERN_ERR
"ide-tape: %s: Can't allocate a tape structure
\n
"
,
drive
->
name
);
goto
failed
;
}
if
(
ide_register_subdriver
(
drive
,
&
idetape_driver
,
IDE_SUBDRIVER_VERSION
))
{
if
(
ide_register_subdriver
(
drive
,
&
idetape_driver
))
{
printk
(
KERN_ERR
"ide-tape: %s: Failed to register the driver with ide.c
\n
"
,
drive
->
name
);
kfree
(
tape
);
goto
failed
;
...
...
drivers/ide/ide.c
View file @
bd877aaf
...
...
@@ -2274,15 +2274,15 @@ static void setup_driver_defaults (ide_driver_t *d)
d
->
start_power_step
=
default_start_power_step
;
}
int
ide_register_subdriver
(
ide_drive_t
*
drive
,
ide_driver_t
*
driver
,
int
version
)
int
ide_register_subdriver
(
ide_drive_t
*
drive
,
ide_driver_t
*
driver
)
{
unsigned
long
flags
;
BUG_ON
(
drive
->
driver
==
NULL
);
BUG_ON
(
!
drive
->
driver
);
spin_lock_irqsave
(
&
ide_lock
,
flags
);
if
(
version
!=
IDE_SUBDRIVER_VERSION
||
!
drive
->
present
||
drive
->
driver
!=
&
idedefault_driver
||
drive
->
usage
||
drive
->
dead
)
{
if
(
!
drive
->
present
||
drive
->
driver
!=
&
idedefault_driver
||
drive
->
usage
||
drive
->
dead
)
{
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
return
1
;
}
...
...
drivers/scsi/ide-scsi.c
View file @
bd877aaf
...
...
@@ -971,8 +971,7 @@ static int idescsi_attach(ide_drive_t *drive)
drive
->
driver_data
=
host
;
idescsi
=
scsihost_to_idescsi
(
host
);
idescsi
->
drive
=
drive
;
err
=
ide_register_subdriver
(
drive
,
&
idescsi_driver
,
IDE_SUBDRIVER_VERSION
);
err
=
ide_register_subdriver
(
drive
,
&
idescsi_driver
);
if
(
!
err
)
{
idescsi_setup
(
drive
,
idescsi
);
drive
->
disk
->
fops
=
&
idescsi_ops
;
...
...
include/linux/ide.h
View file @
bd877aaf
...
...
@@ -1152,8 +1152,6 @@ enum {
/*
* Subdrivers support.
*/
#define IDE_SUBDRIVER_VERSION 1
typedef
struct
ide_driver_s
{
struct
module
*
owner
;
const
char
*
name
;
...
...
@@ -1525,7 +1523,7 @@ extern void default_hwif_transport(ide_hwif_t *);
int
ide_register_driver
(
ide_driver_t
*
driver
);
void
ide_unregister_driver
(
ide_driver_t
*
driver
);
int
ide_register_subdriver
(
ide_drive_t
*
drive
,
ide_driver_t
*
driver
,
int
version
);
int
ide_register_subdriver
(
ide_drive_t
*
,
ide_driver_t
*
);
int
ide_unregister_subdriver
(
ide_drive_t
*
drive
);
int
ide_replace_subdriver
(
ide_drive_t
*
drive
,
const
char
*
driver
);
...
...
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