diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:14 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:14 -0400 |
commit | 806f80a6fc203ad0bde84e5a9e94572617d2ae45 (patch) | |
tree | 20c684323e6e9f24af96df84008f06425a67ec6a /drivers/ide/ide-floppy_ioctl.c | |
parent | 79cb380397c834a35952d8497651d93b543ef968 (diff) |
ide: add generic ATA/ATAPI disk driver
* Add struct ide_disk_ops containing protocol specific methods.
* Add 'struct ide_disk_ops *' to ide_drive_t.
* Convert ide-{disk,floppy} drivers to use struct ide_disk_ops.
* Merge ide-{disk,floppy} drivers into generic ide-gd driver.
While at it:
- ide_disk_init_capacity() -> ide_disk_get_capacity()
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy_ioctl.c')
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index b1f391df6cca..e8aa0a5bf5dc 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | static int ide_floppy_get_format_capacities(ide_drive_t *drive, int __user *arg) | 34 | static int ide_floppy_get_format_capacities(ide_drive_t *drive, int __user *arg) |
35 | { | 35 | { |
36 | struct ide_floppy_obj *floppy = drive->driver_data; | 36 | struct ide_disk_obj *floppy = drive->driver_data; |
37 | struct ide_atapi_pc pc; | 37 | struct ide_atapi_pc pc; |
38 | u8 header_len, desc_cnt; | 38 | u8 header_len, desc_cnt; |
39 | int i, blocks, length, u_array_size, u_index; | 39 | int i, blocks, length, u_array_size, u_index; |
@@ -260,13 +260,10 @@ static int ide_floppy_format_ioctl(ide_drive_t *drive, struct file *file, | |||
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
263 | int ide_floppy_ioctl(struct inode *inode, struct file *file, | 263 | int ide_floppy_ioctl(ide_drive_t *drive, struct inode *inode, |
264 | unsigned int cmd, unsigned long arg) | 264 | struct file *file, unsigned int cmd, unsigned long arg) |
265 | { | 265 | { |
266 | struct block_device *bdev = inode->i_bdev; | 266 | struct block_device *bdev = inode->i_bdev; |
267 | struct ide_floppy_obj *floppy = ide_drv_g(bdev->bd_disk, | ||
268 | ide_floppy_obj); | ||
269 | ide_drive_t *drive = floppy->drive; | ||
270 | struct ide_atapi_pc pc; | 267 | struct ide_atapi_pc pc; |
271 | void __user *argp = (void __user *)arg; | 268 | void __user *argp = (void __user *)arg; |
272 | int err; | 269 | int err; |