diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 09:36:16 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:59 -0400 |
commit | 8cfc7ca40c41e6cb9ee96c149d5b928564d635e4 (patch) | |
tree | 7bb3eab7c0e5cddb884ab91cdcb84e9435592ceb /drivers/block | |
parent | b6a895307a6a8d8c294c57d319ec05286d181dac (diff) |
[PATCH] switch pf
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/paride/pf.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index e08ca5161ad8..bef3b997ba3e 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0); | |||
201 | #define ATAPI_READ_10 0x28 | 201 | #define ATAPI_READ_10 0x28 |
202 | #define ATAPI_WRITE_10 0x2a | 202 | #define ATAPI_WRITE_10 0x2a |
203 | 203 | ||
204 | static int pf_open(struct inode *inode, struct file *file); | 204 | static int pf_open(struct block_device *bdev, fmode_t mode); |
205 | static void do_pf_request(struct request_queue * q); | 205 | static void do_pf_request(struct request_queue * q); |
206 | static int pf_ioctl(struct inode *inode, struct file *file, | 206 | static int pf_ioctl(struct block_device *bdev, fmode_t mode, |
207 | unsigned int cmd, unsigned long arg); | 207 | unsigned int cmd, unsigned long arg); |
208 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 208 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
209 | 209 | ||
210 | static int pf_release(struct inode *inode, struct file *file); | 210 | static int pf_release(struct gendisk *disk, fmode_t mode); |
211 | 211 | ||
212 | static int pf_detect(void); | 212 | static int pf_detect(void); |
213 | static void do_pf_read(void); | 213 | static void do_pf_read(void); |
@@ -264,9 +264,9 @@ static char *pf_buf; /* buffer for request in progress */ | |||
264 | 264 | ||
265 | static struct block_device_operations pf_fops = { | 265 | static struct block_device_operations pf_fops = { |
266 | .owner = THIS_MODULE, | 266 | .owner = THIS_MODULE, |
267 | .__open = pf_open, | 267 | .open = pf_open, |
268 | .__release = pf_release, | 268 | .release = pf_release, |
269 | .__ioctl = pf_ioctl, | 269 | .locked_ioctl = pf_ioctl, |
270 | .getgeo = pf_getgeo, | 270 | .getgeo = pf_getgeo, |
271 | .media_changed = pf_check_media, | 271 | .media_changed = pf_check_media, |
272 | }; | 272 | }; |
@@ -296,16 +296,16 @@ static void __init pf_init_units(void) | |||
296 | } | 296 | } |
297 | } | 297 | } |
298 | 298 | ||
299 | static int pf_open(struct inode *inode, struct file *file) | 299 | static int pf_open(struct block_device *bdev, fmode_t mode) |
300 | { | 300 | { |
301 | struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; | 301 | struct pf_unit *pf = bdev->bd_disk->private_data; |
302 | 302 | ||
303 | pf_identify(pf); | 303 | pf_identify(pf); |
304 | 304 | ||
305 | if (pf->media_status == PF_NM) | 305 | if (pf->media_status == PF_NM) |
306 | return -ENODEV; | 306 | return -ENODEV; |
307 | 307 | ||
308 | if ((pf->media_status == PF_RO) && (file->f_mode & FMODE_WRITE)) | 308 | if ((pf->media_status == PF_RO) && (mode & FMODE_WRITE)) |
309 | return -EROFS; | 309 | return -EROFS; |
310 | 310 | ||
311 | pf->access++; | 311 | pf->access++; |
@@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
333 | return 0; | 333 | return 0; |
334 | } | 334 | } |
335 | 335 | ||
336 | static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | 336 | static int pf_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) |
337 | { | 337 | { |
338 | struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; | 338 | struct pf_unit *pf = bdev->bd_disk->private_data; |
339 | 339 | ||
340 | if (cmd != CDROMEJECT) | 340 | if (cmd != CDROMEJECT) |
341 | return -EINVAL; | 341 | return -EINVAL; |
@@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un | |||
346 | return 0; | 346 | return 0; |
347 | } | 347 | } |
348 | 348 | ||
349 | static int pf_release(struct inode *inode, struct file *file) | 349 | static int pf_release(struct gendisk *disk, fmode_t mode) |
350 | { | 350 | { |
351 | struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; | 351 | struct pf_unit *pf = disk->private_data; |
352 | 352 | ||
353 | if (pf->access <= 0) | 353 | if (pf->access <= 0) |
354 | return -EINVAL; | 354 | return -EINVAL; |