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
82cc65a9
Commit
82cc65a9
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] gendisk for stram
stram switched to use of gendisk
parent
71dd8909
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
arch/m68k/atari/stram.c
arch/m68k/atari/stram.c
+23
-20
No files found.
arch/m68k/atari/stram.c
View file @
82cc65a9
...
...
@@ -974,8 +974,6 @@ void __init stram_swap_setup(char *str, int *ints)
/* ST-RAM device */
/* ------------------------------------------------------------------------ */
static
int
stram_sizes
[
14
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
static
int
refcnt
=
0
;
static
void
do_stram_request
(
request_queue_t
*
q
)
...
...
@@ -1048,28 +1046,33 @@ static struct block_device_operations stram_fops = {
.
release
=
stram_release
,
};
static
struct
gendisk
stram_disk
=
{
.
major
=
STRAM_MAJOR
,
.
first_minor
=
STRAM_MINOR
,
.
minor_shift
=
0
,
.
fops
=
&
stram_fops
,
.
major_name
=
"stram"
};
int
__init
stram_device_init
(
void
)
{
if
(
!
MACH_IS_ATARI
)
/* no point in initializing this, I hope */
return
(
-
ENXIO
)
;
return
-
ENXIO
;
if
(
!
max_swap_size
)
/* swapping not enabled */
return
(
-
ENXIO
)
;
return
-
ENXIO
;
if
(
register_blkdev
(
STRAM_MAJOR
,
"stram"
,
&
stram_fops
))
{
printk
(
KERN_ERR
"stram: Unable to get major %d
\n
"
,
STRAM_MAJOR
);
return
(
-
ENXIO
)
;
printk
(
KERN_ERR
"stram: Unable to get major %d
\n
"
,
STRAM_MAJOR
);
return
-
ENXIO
;
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
STRAM_MAJOR
),
do_stram_request
);
stram_sizes
[
STRAM_MINOR
]
=
(
swap_end
-
swap_start
)
/
1024
;
blk_size
[
STRAM_MAJOR
]
=
stram_sizes
;
register_disk
(
NULL
,
MKDEV
(
STRAM_MAJOR
,
STRAM_MINOR
),
1
,
&
stram_fops
,
(
swap_end
-
swap_start
)
>>
9
);
return
(
0
);
set_capacity
(
&
stram_disk
,
(
swap_end
-
swap_start
)
/
512
);
add_disk
(
&
stram_disk
);
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