diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-12-01 02:16:22 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-12-01 02:16:22 -0500 |
commit | 838632438145ac6863377eb12d8b8eef9c55d288 (patch) | |
tree | fbb0757df837f3c75a99c518a3596c38daef162d /drivers/char/hw_random | |
parent | 9996508b3353063f2d6c48c1a28a84543d72d70b (diff) | |
parent | 29e553631b2a0d4eebd23db630572e1027a9967a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/core.c | 2 | ||||
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 4 | ||||
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 82367262f3a8..5c2d13c6e189 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
@@ -174,7 +174,7 @@ static const struct file_operations rng_chrdev_ops = { | |||
174 | static struct miscdevice rng_miscdev = { | 174 | static struct miscdevice rng_miscdev = { |
175 | .minor = RNG_MISCDEV_MINOR, | 175 | .minor = RNG_MISCDEV_MINOR, |
176 | .name = RNG_MODULE_NAME, | 176 | .name = RNG_MODULE_NAME, |
177 | .devnode = "hwrng", | 177 | .nodename = "hwrng", |
178 | .fops = &rng_chrdev_ops, | 178 | .fops = &rng_chrdev_ops, |
179 | }; | 179 | }; |
180 | 180 | ||
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 00dd3de1be51..06aad0831c73 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
@@ -116,7 +116,7 @@ static int __devinit omap_rng_probe(struct platform_device *pdev) | |||
116 | if (!res) | 116 | if (!res) |
117 | return -ENOENT; | 117 | return -ENOENT; |
118 | 118 | ||
119 | mem = request_mem_region(res->start, res->end - res->start + 1, | 119 | mem = request_mem_region(res->start, resource_size(res), |
120 | pdev->name); | 120 | pdev->name); |
121 | if (mem == NULL) { | 121 | if (mem == NULL) { |
122 | ret = -EBUSY; | 122 | ret = -EBUSY; |
@@ -124,7 +124,7 @@ static int __devinit omap_rng_probe(struct platform_device *pdev) | |||
124 | } | 124 | } |
125 | 125 | ||
126 | dev_set_drvdata(&pdev->dev, mem); | 126 | dev_set_drvdata(&pdev->dev, mem); |
127 | rng_base = ioremap(res->start, res->end - res->start + 1); | 127 | rng_base = ioremap(res->start, resource_size(res)); |
128 | if (!rng_base) { | 128 | if (!rng_base) { |
129 | ret = -ENOMEM; | 129 | ret = -ENOMEM; |
130 | goto err_ioremap; | 130 | goto err_ioremap; |
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 32216b623248..915157fcff98 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -51,7 +51,7 @@ static void register_buffer(void) | |||
51 | 51 | ||
52 | sg_init_one(&sg, random_data+data_left, RANDOM_DATA_SIZE-data_left); | 52 | sg_init_one(&sg, random_data+data_left, RANDOM_DATA_SIZE-data_left); |
53 | /* There should always be room for one buffer. */ | 53 | /* There should always be room for one buffer. */ |
54 | if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) != 0) | 54 | if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) < 0) |
55 | BUG(); | 55 | BUG(); |
56 | vq->vq_ops->kick(vq); | 56 | vq->vq_ops->kick(vq); |
57 | } | 57 | } |
@@ -116,7 +116,7 @@ static int virtrng_probe(struct virtio_device *vdev) | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static void virtrng_remove(struct virtio_device *vdev) | 119 | static void __devexit virtrng_remove(struct virtio_device *vdev) |
120 | { | 120 | { |
121 | vdev->config->reset(vdev); | 121 | vdev->config->reset(vdev); |
122 | hwrng_unregister(&virtio_hwrng); | 122 | hwrng_unregister(&virtio_hwrng); |