diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 12:02:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 12:02:32 -0400 |
commit | ea02259fdf47ca81ff3ca0c22906d989094fb8ff (patch) | |
tree | 5d3672aa246e016f695bc62a861902a50de7b461 /arch/um/drivers | |
parent | 8fe74cf053de7ad2124a894996f84fa890a81093 (diff) | |
parent | eae6c2b6414fc6673ac5415442fe463c01005366 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/linux-hdreg-h-cleanup
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/linux-hdreg-h-cleanup:
remove <linux/ata.h> include from <linux/hdreg.h>
include/linux/hdreg.h: remove unused defines
isd200: use ATA_* defines instead of *_STAT and *_ERR ones
include/linux/hdreg.h: cover WIN_* and friends with #ifndef/#endif __KERNEL__
aoe: WIN_* -> ATA_CMD_*
isd200: WIN_* -> ATA_CMD_*
include/linux/hdreg.h: cover struct hd_driveid with #ifndef/#endif __KERNEL__
xsysace: make it 'struct hd_driveid'-free
ubd_kern: make it 'struct hd_driveid'-free
isd200: make it 'struct hd_driveid'-free
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index d42f826a8ab9..f934225fd8ef 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "linux/kernel.h" | 22 | #include "linux/kernel.h" |
23 | #include "linux/module.h" | 23 | #include "linux/module.h" |
24 | #include "linux/blkdev.h" | 24 | #include "linux/blkdev.h" |
25 | #include "linux/ata.h" | ||
25 | #include "linux/hdreg.h" | 26 | #include "linux/hdreg.h" |
26 | #include "linux/init.h" | 27 | #include "linux/init.h" |
27 | #include "linux/cdrom.h" | 28 | #include "linux/cdrom.h" |
@@ -1308,16 +1309,15 @@ static int ubd_ioctl(struct block_device *bdev, fmode_t mode, | |||
1308 | unsigned int cmd, unsigned long arg) | 1309 | unsigned int cmd, unsigned long arg) |
1309 | { | 1310 | { |
1310 | struct ubd *ubd_dev = bdev->bd_disk->private_data; | 1311 | struct ubd *ubd_dev = bdev->bd_disk->private_data; |
1311 | struct hd_driveid ubd_id = { | 1312 | u16 ubd_id[ATA_ID_WORDS]; |
1312 | .cyls = 0, | ||
1313 | .heads = 128, | ||
1314 | .sectors = 32, | ||
1315 | }; | ||
1316 | 1313 | ||
1317 | switch (cmd) { | 1314 | switch (cmd) { |
1318 | struct cdrom_volctrl volume; | 1315 | struct cdrom_volctrl volume; |
1319 | case HDIO_GET_IDENTITY: | 1316 | case HDIO_GET_IDENTITY: |
1320 | ubd_id.cyls = ubd_dev->size / (128 * 32 * 512); | 1317 | memset(&ubd_id, 0, ATA_ID_WORDS * 2); |
1318 | ubd_id[ATA_ID_CYLS] = ubd_dev->size / (128 * 32 * 512); | ||
1319 | ubd_id[ATA_ID_HEADS] = 128; | ||
1320 | ubd_id[ATA_ID_SECTORS] = 32; | ||
1321 | if(copy_to_user((char __user *) arg, (char *) &ubd_id, | 1321 | if(copy_to_user((char __user *) arg, (char *) &ubd_id, |
1322 | sizeof(ubd_id))) | 1322 | sizeof(ubd_id))) |
1323 | return -EFAULT; | 1323 | return -EFAULT; |