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
11b005b5
Commit
11b005b5
authored
Jan 07, 2005
by
Bartlomiej Zolnierkiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ide] kill current_capacity()
Signed-off-by:
Bartlomiej Zolnierkiewicz
<
bzolnier@gmail.com
>
parent
dec99512
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
27 deletions
+4
-27
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+2
-2
drivers/ide/ide-floppy.c
drivers/ide/ide-floppy.c
+2
-2
drivers/ide/ide.c
drivers/ide/ide.c
+0
-18
include/linux/ide.h
include/linux/ide.h
+0
-5
No files found.
drivers/ide/ide-disk.c
View file @
11b005b5
...
@@ -1248,7 +1248,7 @@ static int idedisk_media_changed(struct gendisk *disk)
...
@@ -1248,7 +1248,7 @@ static int idedisk_media_changed(struct gendisk *disk)
static
int
idedisk_revalidate_disk
(
struct
gendisk
*
disk
)
static
int
idedisk_revalidate_disk
(
struct
gendisk
*
disk
)
{
{
ide_drive_t
*
drive
=
disk
->
private_data
;
ide_drive_t
*
drive
=
disk
->
private_data
;
set_capacity
(
disk
,
current
_capacity
(
drive
));
set_capacity
(
disk
,
idedisk
_capacity
(
drive
));
return
0
;
return
0
;
}
}
...
@@ -1292,7 +1292,7 @@ static int idedisk_attach(ide_drive_t *drive)
...
@@ -1292,7 +1292,7 @@ static int idedisk_attach(ide_drive_t *drive)
strcpy
(
g
->
devfs_name
,
drive
->
devfs_name
);
strcpy
(
g
->
devfs_name
,
drive
->
devfs_name
);
g
->
driverfs_dev
=
&
drive
->
gendev
;
g
->
driverfs_dev
=
&
drive
->
gendev
;
g
->
flags
=
drive
->
removable
?
GENHD_FL_REMOVABLE
:
0
;
g
->
flags
=
drive
->
removable
?
GENHD_FL_REMOVABLE
:
0
;
set_capacity
(
g
,
current
_capacity
(
drive
));
set_capacity
(
g
,
idedisk
_capacity
(
drive
));
g
->
fops
=
&
idedisk_ops
;
g
->
fops
=
&
idedisk_ops
;
add_disk
(
g
);
add_disk
(
g
);
return
0
;
return
0
;
...
...
drivers/ide/ide-floppy.c
View file @
11b005b5
...
@@ -1640,7 +1640,7 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
...
@@ -1640,7 +1640,7 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
}
}
/*
/*
* Return the current floppy capacity
to ide.c
.
* Return the current floppy capacity.
*/
*/
static
sector_t
idefloppy_capacity
(
ide_drive_t
*
drive
)
static
sector_t
idefloppy_capacity
(
ide_drive_t
*
drive
)
{
{
...
@@ -2034,7 +2034,7 @@ static int idefloppy_media_changed(struct gendisk *disk)
...
@@ -2034,7 +2034,7 @@ static int idefloppy_media_changed(struct gendisk *disk)
static
int
idefloppy_revalidate_disk
(
struct
gendisk
*
disk
)
static
int
idefloppy_revalidate_disk
(
struct
gendisk
*
disk
)
{
{
ide_drive_t
*
drive
=
disk
->
private_data
;
ide_drive_t
*
drive
=
disk
->
private_data
;
set_capacity
(
disk
,
current
_capacity
(
drive
));
set_capacity
(
disk
,
idefloppy
_capacity
(
drive
));
return
0
;
return
0
;
}
}
...
...
drivers/ide/ide.c
View file @
11b005b5
...
@@ -358,24 +358,6 @@ int ide_system_bus_speed (void)
...
@@ -358,24 +358,6 @@ int ide_system_bus_speed (void)
return
system_bus_speed
;
return
system_bus_speed
;
}
}
/**
* current_capacity - drive capacity
* @drive: drive to query
*
* Return the current capacity (in sectors) of a drive according to
* its current geometry/LBA settings. Empty removables are reported
* as size zero.
*/
sector_t
current_capacity
(
ide_drive_t
*
drive
)
{
if
(
!
drive
->
present
)
return
0
;
return
DRIVER
(
drive
)
->
capacity
(
drive
);
}
EXPORT_SYMBOL
(
current_capacity
);
static
int
ide_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
static
int
ide_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
{
return
-
ENXIO
;
return
-
ENXIO
;
...
...
include/linux/ide.h
View file @
11b005b5
...
@@ -1187,11 +1187,6 @@ extern void ide_fixstring(u8 *, const int, const int);
...
@@ -1187,11 +1187,6 @@ extern void ide_fixstring(u8 *, const int, const int);
*/
*/
extern
int
ide_wait_stat
(
ide_startstop_t
*
,
ide_drive_t
*
,
u8
,
u8
,
unsigned
long
);
extern
int
ide_wait_stat
(
ide_startstop_t
*
,
ide_drive_t
*
,
u8
,
u8
,
unsigned
long
);
/*
* Return the current idea about the total capacity of this drive.
*/
extern
sector_t
current_capacity
(
ide_drive_t
*
drive
);
/*
/*
* Start a reset operation for an IDE interface.
* Start a reset operation for an IDE interface.
* The caller should return immediately after invoking this.
* The caller should return immediately after invoking this.
...
...
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