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
61320eeb
Commit
61320eeb
authored
Oct 17, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Oct 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] aztcd.c
* switched to private queue * set ->queue * switched to new methods
parent
bee3b2c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
drivers/cdrom/aztcd.c
drivers/cdrom/aztcd.c
+17
-16
No files found.
drivers/cdrom/aztcd.c
View file @
61320eeb
...
...
@@ -168,8 +168,7 @@
#include <linux/version.h>
#define MAJOR_NR AZTECH_CDROM_MAJOR
#define DEVICE_NR(device) (minor(device))
#define QUEUE (&azt_queue)
#include <linux/blk.h>
#include "aztcd.h"
...
...
@@ -227,10 +226,11 @@
#define AZT_DEBUG_MULTISESSION
#endif
static
struct
request_queue
azt_queue
;
static
int
current_valid
(
void
)
{
return
!
blk_queue_empty
(
QUEUE
)
&&
major
(
CURRENT
->
rq_dev
)
==
MAJOR_NR
&&
CURRENT
->
cmd
==
READ
&&
CURRENT
->
sector
!=
-
1
;
}
...
...
@@ -329,7 +329,7 @@ static int aztGetMultiDiskInfo(void);
static
int
aztGetToc
(
int
multi
);
/* Kernel Interface Functions */
static
int
check_aztcd_media_change
(
kdev_t
full_dev
);
static
int
check_aztcd_media_change
(
struct
gendisk
*
disk
);
static
int
aztcd_ioctl
(
struct
inode
*
ip
,
struct
file
*
fp
,
unsigned
int
cmd
,
unsigned
long
arg
);
static
int
aztcd_open
(
struct
inode
*
ip
,
struct
file
*
fp
);
...
...
@@ -340,7 +340,7 @@ static struct block_device_operations azt_fops = {
.
open
=
aztcd_open
,
.
release
=
aztcd_release
,
.
ioctl
=
aztcd_ioctl
,
.
check_media_change
=
check_aztcd_media_change
,
.
media_changed
=
check_aztcd_media_change
,
};
/* Aztcd State Machine: Controls Drive Operating State */
...
...
@@ -790,7 +790,7 @@ static int aztGetQChannelInfo(struct azt_Toc *qp)
/*
* Read the table of contents (TOC) and TOC header if necessary
*/
static
int
aztUpdateToc
()
static
int
aztUpdateToc
(
void
)
{
int
st
;
...
...
@@ -1141,7 +1141,7 @@ __setup("aztcd=", aztcd_setup);
/*
* Checking if the media has been changed
*/
static
int
check_aztcd_media_change
(
kdev_t
full_dev
)
static
int
check_aztcd_media_change
(
struct
gendisk
*
disk
)
{
if
(
aztDiskChanged
)
{
/* disk changed */
aztDiskChanged
=
0
;
...
...
@@ -1677,8 +1677,8 @@ static int aztcd_release(struct inode *inode, struct file *file)
{
#ifdef AZT_DEBUG
printk
(
"aztcd: executing aztcd_release
\n
"
);
printk
(
"inode: %p,
inode->i_rdev: %x
file: %p
\n
"
,
inode
,
inode
->
i_
rdev
,
file
);
printk
(
"inode: %p,
device: %s
file: %p
\n
"
,
inode
,
inode
->
i_
bdev
->
bd_disk
->
disk_name
,
file
);
#endif
if
(
!--
azt_open_count
)
{
azt_invalidate_buffers
();
...
...
@@ -1917,12 +1917,13 @@ static int __init aztcd_init(void)
ret
=
-
EIO
;
goto
err_out3
;
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
)
,
do_aztcd_request
,
&
aztSpin
);
blk_queue_hardsect_size
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
)
,
2048
);
blk_init_queue
(
&
azt_queue
,
do_aztcd_request
,
&
aztSpin
);
blk_queue_hardsect_size
(
&
azt_queue
,
2048
);
azt_disk
->
major
=
MAJOR_NR
;
azt_disk
->
first_minor
=
0
;
azt_disk
->
fops
=
&
azt_fops
;
sprintf
(
azt_disk
->
disk_name
,
"aztcd"
);
azt_disk
->
queue
=
&
azt_queue
;
add_disk
(
azt_disk
);
azt_invalidate_buffers
();
...
...
@@ -1952,7 +1953,7 @@ static void __exit aztcd_exit(void)
printk
(
"What's that: can't unregister aztcd
\n
"
);
return
;
}
blk_cleanup_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
)
);
blk_cleanup_queue
(
&
azt_queue
);
if
((
azt_port
==
0x1f0
)
||
(
azt_port
==
0x170
))
{
SWITCH_IDE_MASTER
;
release_region
(
azt_port
,
8
);
/*IDE-interface */
...
...
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