diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-22 18:35:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-22 18:35:16 -0400 |
commit | 964fe080d94db82a3268443e9b9ece4c60246414 (patch) | |
tree | d0095a9befb34f77bf32757e7465e5d2cbc40a93 /drivers | |
parent | 4848490c50c5d46d4e9749fddc374c303823bcc4 (diff) | |
parent | ff07eb897a97640b7ac0262cd50311ad403038f8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
move virtrng_remove to .devexit.text
move virtballoon_remove to .devexit.text
virtio_blk: Revert serial number support
virtio: let header files include virtio_ids.h
virtio_blk: revert QUEUE_FLAG_VIRT addition
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/virtio_blk.c | 39 | ||||
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 3 | ||||
-rw-r--r-- | drivers/char/virtio_console.c | 1 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 1 | ||||
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 3 |
5 files changed, 5 insertions, 42 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 43f19389647a..51042f0ba7e1 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -3,7 +3,6 @@ | |||
3 | #include <linux/blkdev.h> | 3 | #include <linux/blkdev.h> |
4 | #include <linux/hdreg.h> | 4 | #include <linux/hdreg.h> |
5 | #include <linux/virtio.h> | 5 | #include <linux/virtio.h> |
6 | #include <linux/virtio_ids.h> | ||
7 | #include <linux/virtio_blk.h> | 6 | #include <linux/virtio_blk.h> |
8 | #include <linux/scatterlist.h> | 7 | #include <linux/scatterlist.h> |
9 | 8 | ||
@@ -183,34 +182,6 @@ static void do_virtblk_request(struct request_queue *q) | |||
183 | vblk->vq->vq_ops->kick(vblk->vq); | 182 | vblk->vq->vq_ops->kick(vblk->vq); |
184 | } | 183 | } |
185 | 184 | ||
186 | /* return ATA identify data | ||
187 | */ | ||
188 | static int virtblk_identify(struct gendisk *disk, void *argp) | ||
189 | { | ||
190 | struct virtio_blk *vblk = disk->private_data; | ||
191 | void *opaque; | ||
192 | int err = -ENOMEM; | ||
193 | |||
194 | opaque = kmalloc(VIRTIO_BLK_ID_BYTES, GFP_KERNEL); | ||
195 | if (!opaque) | ||
196 | goto out; | ||
197 | |||
198 | err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, | ||
199 | offsetof(struct virtio_blk_config, identify), opaque, | ||
200 | VIRTIO_BLK_ID_BYTES); | ||
201 | |||
202 | if (err) | ||
203 | goto out_kfree; | ||
204 | |||
205 | if (copy_to_user(argp, opaque, VIRTIO_BLK_ID_BYTES)) | ||
206 | err = -EFAULT; | ||
207 | |||
208 | out_kfree: | ||
209 | kfree(opaque); | ||
210 | out: | ||
211 | return err; | ||
212 | } | ||
213 | |||
214 | static void virtblk_prepare_flush(struct request_queue *q, struct request *req) | 185 | static void virtblk_prepare_flush(struct request_queue *q, struct request *req) |
215 | { | 186 | { |
216 | req->cmd_type = REQ_TYPE_LINUX_BLOCK; | 187 | req->cmd_type = REQ_TYPE_LINUX_BLOCK; |
@@ -222,10 +193,6 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
222 | { | 193 | { |
223 | struct gendisk *disk = bdev->bd_disk; | 194 | struct gendisk *disk = bdev->bd_disk; |
224 | struct virtio_blk *vblk = disk->private_data; | 195 | struct virtio_blk *vblk = disk->private_data; |
225 | void __user *argp = (void __user *)data; | ||
226 | |||
227 | if (cmd == HDIO_GET_IDENTITY) | ||
228 | return virtblk_identify(disk, argp); | ||
229 | 196 | ||
230 | /* | 197 | /* |
231 | * Only allow the generic SCSI ioctls if the host can support it. | 198 | * Only allow the generic SCSI ioctls if the host can support it. |
@@ -233,7 +200,8 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
233 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | 200 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) |
234 | return -ENOTTY; | 201 | return -ENOTTY; |
235 | 202 | ||
236 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 203 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, |
204 | (void __user *)data); | ||
237 | } | 205 | } |
238 | 206 | ||
239 | /* We provide getgeo only to please some old bootloader/partitioning tools */ | 207 | /* We provide getgeo only to please some old bootloader/partitioning tools */ |
@@ -332,7 +300,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
332 | } | 300 | } |
333 | 301 | ||
334 | vblk->disk->queue->queuedata = vblk; | 302 | vblk->disk->queue->queuedata = vblk; |
335 | queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue); | ||
336 | 303 | ||
337 | if (index < 26) { | 304 | if (index < 26) { |
338 | sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); | 305 | sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); |
@@ -445,7 +412,7 @@ static struct virtio_device_id id_table[] = { | |||
445 | static unsigned int features[] = { | 412 | static unsigned int features[] = { |
446 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, | 413 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, |
447 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, | 414 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, |
448 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY, VIRTIO_BLK_F_FLUSH | 415 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_FLUSH |
449 | }; | 416 | }; |
450 | 417 | ||
451 | /* | 418 | /* |
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 962968f05b94..915157fcff98 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/virtio.h> | 23 | #include <linux/virtio.h> |
24 | #include <linux/virtio_ids.h> | ||
25 | #include <linux/virtio_rng.h> | 24 | #include <linux/virtio_rng.h> |
26 | 25 | ||
27 | /* The host will fill any buffer we give it with sweet, sweet randomness. We | 26 | /* The host will fill any buffer we give it with sweet, sweet randomness. We |
@@ -117,7 +116,7 @@ static int virtrng_probe(struct virtio_device *vdev) | |||
117 | return 0; | 116 | return 0; |
118 | } | 117 | } |
119 | 118 | ||
120 | static void virtrng_remove(struct virtio_device *vdev) | 119 | static void __devexit virtrng_remove(struct virtio_device *vdev) |
121 | { | 120 | { |
122 | vdev->config->reset(vdev); | 121 | vdev->config->reset(vdev); |
123 | hwrng_unregister(&virtio_hwrng); | 122 | hwrng_unregister(&virtio_hwrng); |
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 0d328b59568d..a035ae39a359 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/err.h> | 31 | #include <linux/err.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/virtio.h> | 33 | #include <linux/virtio.h> |
34 | #include <linux/virtio_ids.h> | ||
35 | #include <linux/virtio_console.h> | 34 | #include <linux/virtio_console.h> |
36 | #include "hvc_console.h" | 35 | #include "hvc_console.h" |
37 | 36 | ||
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 54bf0912b737..3709d6af9abf 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/virtio.h> | 24 | #include <linux/virtio.h> |
25 | #include <linux/virtio_ids.h> | ||
26 | #include <linux/virtio_net.h> | 25 | #include <linux/virtio_net.h> |
27 | #include <linux/scatterlist.h> | 26 | #include <linux/scatterlist.h> |
28 | #include <linux/if_vlan.h> | 27 | #include <linux/if_vlan.h> |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 200c22f55130..9dd588042880 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | //#define DEBUG | 20 | //#define DEBUG |
21 | #include <linux/virtio.h> | 21 | #include <linux/virtio.h> |
22 | #include <linux/virtio_ids.h> | ||
23 | #include <linux/virtio_balloon.h> | 22 | #include <linux/virtio_balloon.h> |
24 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
25 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
@@ -248,7 +247,7 @@ out: | |||
248 | return err; | 247 | return err; |
249 | } | 248 | } |
250 | 249 | ||
251 | static void virtballoon_remove(struct virtio_device *vdev) | 250 | static void __devexit virtballoon_remove(struct virtio_device *vdev) |
252 | { | 251 | { |
253 | struct virtio_balloon *vb = vdev->priv; | 252 | struct virtio_balloon *vb = vdev->priv; |
254 | 253 | ||