diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 5 | ||||
-rw-r--r-- | arch/xtensa/platforms/iss/simdisk.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 41bf72073ccc..879990cb66c6 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -87,7 +87,7 @@ static DEFINE_MUTEX(ubd_lock); | |||
87 | static DEFINE_MUTEX(ubd_mutex); /* replaces BKL, might not be needed */ | 87 | static DEFINE_MUTEX(ubd_mutex); /* replaces BKL, might not be needed */ |
88 | 88 | ||
89 | static int ubd_open(struct block_device *bdev, fmode_t mode); | 89 | static int ubd_open(struct block_device *bdev, fmode_t mode); |
90 | static int ubd_release(struct gendisk *disk, fmode_t mode); | 90 | static void ubd_release(struct gendisk *disk, fmode_t mode); |
91 | static int ubd_ioctl(struct block_device *bdev, fmode_t mode, | 91 | static int ubd_ioctl(struct block_device *bdev, fmode_t mode, |
92 | unsigned int cmd, unsigned long arg); | 92 | unsigned int cmd, unsigned long arg); |
93 | static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 93 | static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
@@ -1138,7 +1138,7 @@ out: | |||
1138 | return err; | 1138 | return err; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | static int ubd_release(struct gendisk *disk, fmode_t mode) | 1141 | static void ubd_release(struct gendisk *disk, fmode_t mode) |
1142 | { | 1142 | { |
1143 | struct ubd *ubd_dev = disk->private_data; | 1143 | struct ubd *ubd_dev = disk->private_data; |
1144 | 1144 | ||
@@ -1146,7 +1146,6 @@ static int ubd_release(struct gendisk *disk, fmode_t mode) | |||
1146 | if(--ubd_dev->count == 0) | 1146 | if(--ubd_dev->count == 0) |
1147 | ubd_close_dev(ubd_dev); | 1147 | ubd_close_dev(ubd_dev); |
1148 | mutex_unlock(&ubd_mutex); | 1148 | mutex_unlock(&ubd_mutex); |
1149 | return 0; | ||
1150 | } | 1149 | } |
1151 | 1150 | ||
1152 | static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask, | 1151 | static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask, |
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c index 88608cc11b8c..0345f43d34f3 100644 --- a/arch/xtensa/platforms/iss/simdisk.c +++ b/arch/xtensa/platforms/iss/simdisk.c | |||
@@ -139,13 +139,12 @@ static int simdisk_open(struct block_device *bdev, fmode_t mode) | |||
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
141 | 141 | ||
142 | static int simdisk_release(struct gendisk *disk, fmode_t mode) | 142 | static void simdisk_release(struct gendisk *disk, fmode_t mode) |
143 | { | 143 | { |
144 | struct simdisk *dev = disk->private_data; | 144 | struct simdisk *dev = disk->private_data; |
145 | spin_lock(&dev->lock); | 145 | spin_lock(&dev->lock); |
146 | --dev->users; | 146 | --dev->users; |
147 | spin_unlock(&dev->lock); | 147 | spin_unlock(&dev->lock); |
148 | return 0; | ||
149 | } | 148 | } |
150 | 149 | ||
151 | static const struct block_device_operations simdisk_ops = { | 150 | static const struct block_device_operations simdisk_ops = { |