diff options
Diffstat (limited to 'drivers/block/ataflop.c')
-rw-r--r-- | drivers/block/ataflop.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index e35cf59cbfd..1bb8bfcfdbd 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/delay.h> | 67 | #include <linux/delay.h> |
68 | #include <linux/init.h> | 68 | #include <linux/init.h> |
69 | #include <linux/blkdev.h> | 69 | #include <linux/blkdev.h> |
70 | #include <linux/smp_lock.h> | ||
70 | 71 | ||
71 | #include <asm/atafd.h> | 72 | #include <asm/atafd.h> |
72 | #include <asm/atafdreg.h> | 73 | #include <asm/atafdreg.h> |
@@ -359,7 +360,7 @@ static void finish_fdc( void ); | |||
359 | static void finish_fdc_done( int dummy ); | 360 | static void finish_fdc_done( int dummy ); |
360 | static void setup_req_params( int drive ); | 361 | static void setup_req_params( int drive ); |
361 | static void redo_fd_request( void); | 362 | static void redo_fd_request( void); |
362 | static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int | 363 | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int |
363 | cmd, unsigned long param); | 364 | cmd, unsigned long param); |
364 | static void fd_probe( int drive ); | 365 | static void fd_probe( int drive ); |
365 | static int fd_test_drive_present( int drive ); | 366 | static int fd_test_drive_present( int drive ); |
@@ -1480,7 +1481,7 @@ void do_fd_request(struct request_queue * q) | |||
1480 | atari_enable_irq( IRQ_MFP_FDC ); | 1481 | atari_enable_irq( IRQ_MFP_FDC ); |
1481 | } | 1482 | } |
1482 | 1483 | ||
1483 | static int fd_ioctl(struct block_device *bdev, fmode_t mode, | 1484 | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, |
1484 | unsigned int cmd, unsigned long param) | 1485 | unsigned int cmd, unsigned long param) |
1485 | { | 1486 | { |
1486 | struct gendisk *disk = bdev->bd_disk; | 1487 | struct gendisk *disk = bdev->bd_disk; |
@@ -1665,6 +1666,17 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, | |||
1665 | } | 1666 | } |
1666 | } | 1667 | } |
1667 | 1668 | ||
1669 | static int fd_ioctl(struct block_device *bdev, fmode_t mode, | ||
1670 | unsigned int cmd, unsigned long arg) | ||
1671 | { | ||
1672 | int ret; | ||
1673 | |||
1674 | lock_kernel(); | ||
1675 | ret = fd_locked_ioctl(bdev, mode, cmd, arg); | ||
1676 | unlock_kernel(); | ||
1677 | |||
1678 | return ret; | ||
1679 | } | ||
1668 | 1680 | ||
1669 | /* Initialize the 'unit' variable for drive 'drive' */ | 1681 | /* Initialize the 'unit' variable for drive 'drive' */ |
1670 | 1682 | ||
@@ -1855,7 +1867,7 @@ static const struct block_device_operations floppy_fops = { | |||
1855 | .owner = THIS_MODULE, | 1867 | .owner = THIS_MODULE, |
1856 | .open = floppy_open, | 1868 | .open = floppy_open, |
1857 | .release = floppy_release, | 1869 | .release = floppy_release, |
1858 | .locked_ioctl = fd_ioctl, | 1870 | .ioctl = fd_ioctl, |
1859 | .media_changed = check_floppy_change, | 1871 | .media_changed = check_floppy_change, |
1860 | .revalidate_disk= floppy_revalidate, | 1872 | .revalidate_disk= floppy_revalidate, |
1861 | }; | 1873 | }; |