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
66bd02d0
Commit
66bd02d0
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: mtdblock
parent
eb2c5700
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
drivers/mtd/mtdblock.c
drivers/mtd/mtdblock.c
+3
-10
No files found.
drivers/mtd/mtdblock.c
View file @
66bd02d0
...
...
@@ -528,25 +528,20 @@ static void mtd_notify_add(struct mtd_info* mtd)
if
(
!
mtd
||
mtd
->
type
==
MTD_ABSENT
)
return
;
#ifdef CONFIG_DEVFS_FS
sprintf
(
name
,
DEVICE_NAME
"/%d"
,
mtd
->
index
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
MTD_BLOCK_MAJOR
,
mtd
->
index
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
&
mtd_fops
,
NULL
);
#endif
disk
=
alloc_disk
(
1
);
if
(
disk
)
{
disk
->
major
=
MAJOR_NR
;
disk
->
first_minor
=
mtd
->
index
;
disk
->
fops
=
&
mtd_fops
;
sprintf
(
disk
->
disk_name
,
"mtdblock%d"
,
mtd
->
index
);
sprintf
(
disk
->
devfs_name
,
"mtdblock/%d"
,
mtd
->
index
);
mtddisk
[
mtd
->
index
]
=
disk
;
set_capacity
(
disk
,
mtd
->
size
/
512
);
disk
->
private_data
=
&
mtdblks
[
mtd
->
index
];
disk
->
queue
=
&
mtd_queue
;
add_disk
(
disk
);
}
}
...
...
@@ -556,8 +551,6 @@ static void mtd_notify_remove(struct mtd_info* mtd)
if
(
!
mtd
||
mtd
->
type
==
MTD_ABSENT
)
return
;
devfs_remove
(
DEVICE_NAME
"/%d"
,
mtd
->
index
);
if
(
mtddisk
[
mtd
->
index
])
{
del_gendisk
(
mtddisk
[
mtd
->
index
]);
put_disk
(
mtddisk
[
mtd
->
index
]);
...
...
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