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
981de136
Commit
981de136
authored
Sep 21, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Sep 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] compile fixes for ftl
assorted compile fixes
parent
b55a9a52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
drivers/mtd/ftl.c
drivers/mtd/ftl.c
+7
-8
No files found.
drivers/mtd/ftl.c
View file @
981de136
...
...
@@ -119,7 +119,7 @@ MODULE_PARM(shuffle_freq, "i");
/* Each memory region corresponds to a minor device */
typedef
struct
partition_t
{
struct
mtd_info
*
mtd
;
struct
gndisk
*
disk
;
struct
g
e
ndisk
*
disk
;
u_int32_t
state
;
u_int32_t
*
VirtualBlockMap
;
u_int32_t
*
VirtualPageMap
;
...
...
@@ -175,7 +175,6 @@ static int ftl_ioctl(struct inode *inode, struct file *file,
u_int
cmd
,
u_long
arg
);
static
int
ftl_open
(
struct
inode
*
inode
,
struct
file
*
file
);
static
release_t
ftl_close
(
struct
inode
*
inode
,
struct
file
*
file
);
static
int
ftl_reread_partitions
(
kdev_t
dev
);
static
int
ftl_revalidate
(
kdev_t
dev
);
static
void
ftl_erase_callback
(
struct
erase_info
*
done
);
...
...
@@ -1125,7 +1124,7 @@ static int ftl_revalidate(kdev_t dev)
partition_t
*
part
=
myparts
[
unit
];
scan_header
(
part
);
set_capacity
(
part
->
disk
,
le32_to_cpu
(
part
->
header
.
FormattedSize
)
/
SECTOR_SIZE
)
)
;
le32_to_cpu
(
part
->
header
.
FormattedSize
)
/
SECTOR_SIZE
);
return
0
;
}
...
...
@@ -1151,7 +1150,7 @@ static void do_ftl_request(request_arg_t)
if
(
part
)
{
ret
=
0
;
switch
(
CURRENT
->
cmd
)
{
switch
(
rq_data_dir
(
CURRENT
)
)
{
case
READ
:
ret
=
ftl_read
(
part
,
CURRENT
->
buffer
,
CURRENT
->
sector
,
CURRENT
->
current_nr_sectors
);
...
...
@@ -1267,7 +1266,7 @@ static void ftl_notify_add(struct mtd_info *mtd)
static
void
ftl_notify_remove
(
struct
mtd_info
*
mtd
)
{
int
i
,
j
;
int
i
;
/* Q: What happens if you try to remove a device which has
* a currently-open FTL partition on it?
...
...
@@ -1287,7 +1286,7 @@ static void ftl_notify_remove(struct mtd_info *mtd)
myparts
[
i
]
->
state
=
0
;
del_gendisk
(
myparts
[
i
]
->
disk
);
kfree
(
myparts
[
i
]
->
disk
->
name
);
kfree
(
myparts
[
i
]
->
disk
->
major_
name
);
kfree
(
myparts
[
i
]
->
disk
);
kfree
(
myparts
[
i
]);
myparts
[
i
]
=
NULL
;
...
...
@@ -1296,7 +1295,7 @@ static void ftl_notify_remove(struct mtd_info *mtd)
int
init_ftl
(
void
)
{
int
i
;
static
spinlock_t
lock
=
SPIN_LOCK_UNLOCKED
;
DEBUG
(
0
,
"$Id: ftl.c,v 1.39 2001/10/02 15:05:11 dwmw2 Exp $
\n
"
);
if
(
register_blkdev
(
FTL_MAJOR
,
"ftl"
,
&
ftl_blk_fops
))
{
...
...
@@ -1304,7 +1303,7 @@ int init_ftl(void)
"device number!
\n
"
);
return
-
EAGAIN
;
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
FTL_MAJOR
),
&
do_ftl_request
);
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
FTL_MAJOR
),
&
do_ftl_request
,
&
lock
);
register_mtd_user
(
&
ftl_notifier
);
return
0
;
...
...
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