Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213082
b: refs/heads/master
c: d18dfad
h: refs/heads/master
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Sep 10, 2010
1 parent 2ef4ef7 commit 610e841
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93c74931131d3a7af3a6aa18aab0d39978b5d3b5
refs/heads/master: d18dfad4e2bf6c2d2c5c104d882b14b9fee71b14
24 changes: 13 additions & 11 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,18 @@ static int cciss_getheartbeat(ctlr_info_t *h, void __user *argp)
return 0;
}

static int cciss_getbustypes(ctlr_info_t *h, void __user *argp)
{
BusTypes_type BusTypes;

if (!argp)
return -EINVAL;
BusTypes = readl(&h->cfgtable->BusTypes);
if (copy_to_user(argp, &BusTypes, sizeof(BusTypes_type)))
return -EFAULT;
return 0;
}

static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
Expand All @@ -1369,17 +1381,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
case CCISS_GETHEARTBEAT:
return cciss_getheartbeat(h, argp);
case CCISS_GETBUSTYPES:
{
BusTypes_type BusTypes;

if (!arg)
return -EINVAL;
BusTypes = readl(&h->cfgtable->BusTypes);
if (copy_to_user
(argp, &BusTypes, sizeof(BusTypes_type)))
return -EFAULT;
return 0;
}
return cciss_getbustypes(h, argp);
case CCISS_GETFIRMVER:
{
FirmwareVer_type firmware;
Expand Down

0 comments on commit 610e841

Please sign in to comment.