diff options
Diffstat (limited to 'drivers/block/amiflop.c')
-rw-r--r-- | drivers/block/amiflop.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 832798aa14f6..0fa26359304c 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/hdreg.h> | 60 | #include <linux/hdreg.h> |
61 | #include <linux/delay.h> | 61 | #include <linux/delay.h> |
62 | #include <linux/init.h> | 62 | #include <linux/init.h> |
63 | #include <linux/smp_lock.h> | ||
63 | #include <linux/amifdreg.h> | 64 | #include <linux/amifdreg.h> |
64 | #include <linux/amifd.h> | 65 | #include <linux/amifd.h> |
65 | #include <linux/buffer_head.h> | 66 | #include <linux/buffer_head.h> |
@@ -1423,7 +1424,7 @@ static int fd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
1423 | return 0; | 1424 | return 0; |
1424 | } | 1425 | } |
1425 | 1426 | ||
1426 | static int fd_ioctl(struct block_device *bdev, fmode_t mode, | 1427 | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, |
1427 | unsigned int cmd, unsigned long param) | 1428 | unsigned int cmd, unsigned long param) |
1428 | { | 1429 | { |
1429 | struct amiga_floppy_struct *p = bdev->bd_disk->private_data; | 1430 | struct amiga_floppy_struct *p = bdev->bd_disk->private_data; |
@@ -1500,6 +1501,18 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, | |||
1500 | return 0; | 1501 | return 0; |
1501 | } | 1502 | } |
1502 | 1503 | ||
1504 | static int fd_ioctl(struct block_device *bdev, fmode_t mode, | ||
1505 | unsigned int cmd, unsigned long param) | ||
1506 | { | ||
1507 | int ret; | ||
1508 | |||
1509 | lock_kernel(); | ||
1510 | ret = fd_locked_ioctl(bdev, mode, cmd, param); | ||
1511 | unlock_kernel(); | ||
1512 | |||
1513 | return ret; | ||
1514 | } | ||
1515 | |||
1503 | static void fd_probe(int dev) | 1516 | static void fd_probe(int dev) |
1504 | { | 1517 | { |
1505 | unsigned long code; | 1518 | unsigned long code; |
@@ -1638,7 +1651,7 @@ static const struct block_device_operations floppy_fops = { | |||
1638 | .owner = THIS_MODULE, | 1651 | .owner = THIS_MODULE, |
1639 | .open = floppy_open, | 1652 | .open = floppy_open, |
1640 | .release = floppy_release, | 1653 | .release = floppy_release, |
1641 | .locked_ioctl = fd_ioctl, | 1654 | .ioctl = fd_ioctl, |
1642 | .getgeo = fd_getgeo, | 1655 | .getgeo = fd_getgeo, |
1643 | .media_changed = amiga_floppy_change, | 1656 | .media_changed = amiga_floppy_change, |
1644 | }; | 1657 | }; |