Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
8cfc7ca4
Commit
8cfc7ca4
authored
Mar 02, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch pf
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b6a89530
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
drivers/block/paride/pf.c
drivers/block/paride/pf.c
+13
-13
No files found.
drivers/block/paride/pf.c
View file @
8cfc7ca4
...
...
@@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0);
#define ATAPI_READ_10 0x28
#define ATAPI_WRITE_10 0x2a
static
int
pf_open
(
struct
inode
*
inode
,
struct
file
*
fil
e
);
static
int
pf_open
(
struct
block_device
*
bdev
,
fmode_t
mod
e
);
static
void
do_pf_request
(
struct
request_queue
*
q
);
static
int
pf_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
static
int
pf_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
);
static
int
pf_getgeo
(
struct
block_device
*
bdev
,
struct
hd_geometry
*
geo
);
static
int
pf_release
(
struct
inode
*
inode
,
struct
file
*
fil
e
);
static
int
pf_release
(
struct
gendisk
*
disk
,
fmode_t
mod
e
);
static
int
pf_detect
(
void
);
static
void
do_pf_read
(
void
);
...
...
@@ -264,9 +264,9 @@ static char *pf_buf; /* buffer for request in progress */
static
struct
block_device_operations
pf_fops
=
{
.
owner
=
THIS_MODULE
,
.
__
open
=
pf_open
,
.
__
release
=
pf_release
,
.
__ioctl
=
pf_ioctl
,
.
open
=
pf_open
,
.
release
=
pf_release
,
.
locked_ioctl
=
pf_ioctl
,
.
getgeo
=
pf_getgeo
,
.
media_changed
=
pf_check_media
,
};
...
...
@@ -296,16 +296,16 @@ static void __init pf_init_units(void)
}
}
static
int
pf_open
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
pf_open
(
struct
block_device
*
bdev
,
fmode_t
mod
e
)
{
struct
pf_unit
*
pf
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
struct
pf_unit
*
pf
=
bdev
->
bd_disk
->
private_data
;
pf_identify
(
pf
);
if
(
pf
->
media_status
==
PF_NM
)
return
-
ENODEV
;
if
((
pf
->
media_status
==
PF_RO
)
&&
(
file
->
f_
mode
&
FMODE_WRITE
))
if
((
pf
->
media_status
==
PF_RO
)
&&
(
mode
&
FMODE_WRITE
))
return
-
EROFS
;
pf
->
access
++
;
...
...
@@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return
0
;
}
static
int
pf_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
pf_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
pf_unit
*
pf
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
struct
pf_unit
*
pf
=
bdev
->
bd_disk
->
private_data
;
if
(
cmd
!=
CDROMEJECT
)
return
-
EINVAL
;
...
...
@@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
return
0
;
}
static
int
pf_release
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
pf_release
(
struct
gendisk
*
disk
,
fmode_t
mod
e
)
{
struct
pf_unit
*
pf
=
inode
->
i_bdev
->
bd_
disk
->
private_data
;
struct
pf_unit
*
pf
=
disk
->
private_data
;
if
(
pf
->
access
<=
0
)
return
-
EINVAL
;
...
...
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