aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-08-26 13:56:15 -0500
committerJens Axboe <jaxboe@fusionio.com>2010-09-10 12:12:35 +0200
commitc525919ddf0b10ff0e1f528dd50d90edfdee4797 (patch)
tree2c39db5a4e1e648bc5d15c7017663c2139a66aa3 /drivers/block/cciss.c
parent8a4f7fbfdd76a304c8f04dde6b8fd0e5c50bbe76 (diff)
downloadkernel_samsung_tuna-c525919ddf0b10ff0e1f528dd50d90edfdee4797.zip
kernel_samsung_tuna-c525919ddf0b10ff0e1f528dd50d90edfdee4797.tar.gz
kernel_samsung_tuna-c525919ddf0b10ff0e1f528dd50d90edfdee4797.tar.bz2
cciss: factor out cciss_getdrivver
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index c47e601..71018b9 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1371,8 +1371,19 @@ static int cciss_getfirmver(ctlr_info_t *h, void __user *argp)
return 0;
}
+static int cciss_getdrivver(ctlr_info_t *h, void __user *argp)
+{
+ DriverVer_type DriverVer = DRIVER_VERSION;
+
+ if (!argp)
+ return -EINVAL;
+ if (copy_to_user(argp, &DriverVer, sizeof(DriverVer_type)))
+ return -EFAULT;
+ return 0;
+}
+
static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
- unsigned int cmd, unsigned long arg)
+ unsigned int cmd, unsigned long arg)
{
struct gendisk *disk = bdev->bd_disk;
ctlr_info_t *h = get_host(disk);
@@ -1399,18 +1410,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
case CCISS_GETFIRMVER:
return cciss_getfirmver(h, argp);
case CCISS_GETDRIVVER:
- {
- DriverVer_type DriverVer = DRIVER_VERSION;
-
- if (!arg)
- return -EINVAL;
-
- if (copy_to_user
- (argp, &DriverVer, sizeof(DriverVer_type)))
- return -EFAULT;
- return 0;
- }
-
+ return cciss_getdrivver(h, argp);
case CCISS_DEREGDISK:
case CCISS_REGNEWD:
case CCISS_REVALIDVOLS: