diff options
Diffstat (limited to 'sound/aoa')
-rw-r--r-- | sound/aoa/soundbus/i2sbus/core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 3ff8cc5f487a..010658335881 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c | |||
@@ -262,8 +262,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
262 | */ | 262 | */ |
263 | dev->allocated_resource[i] = | 263 | dev->allocated_resource[i] = |
264 | request_mem_region(dev->resources[i].start, | 264 | request_mem_region(dev->resources[i].start, |
265 | dev->resources[i].end - | 265 | resource_size(&dev->resources[i]), |
266 | dev->resources[i].start + 1, | ||
267 | dev->rnames[i]); | 266 | dev->rnames[i]); |
268 | if (!dev->allocated_resource[i]) { | 267 | if (!dev->allocated_resource[i]) { |
269 | printk(KERN_ERR "i2sbus: failed to claim resource %d!\n", i); | 268 | printk(KERN_ERR "i2sbus: failed to claim resource %d!\n", i); |
@@ -272,19 +271,19 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
272 | } | 271 | } |
273 | 272 | ||
274 | r = &dev->resources[aoa_resource_i2smmio]; | 273 | r = &dev->resources[aoa_resource_i2smmio]; |
275 | rlen = r->end - r->start + 1; | 274 | rlen = resource_size(r); |
276 | if (rlen < sizeof(struct i2s_interface_regs)) | 275 | if (rlen < sizeof(struct i2s_interface_regs)) |
277 | goto err; | 276 | goto err; |
278 | dev->intfregs = ioremap(r->start, rlen); | 277 | dev->intfregs = ioremap(r->start, rlen); |
279 | 278 | ||
280 | r = &dev->resources[aoa_resource_txdbdma]; | 279 | r = &dev->resources[aoa_resource_txdbdma]; |
281 | rlen = r->end - r->start + 1; | 280 | rlen = resource_size(r); |
282 | if (rlen < sizeof(struct dbdma_regs)) | 281 | if (rlen < sizeof(struct dbdma_regs)) |
283 | goto err; | 282 | goto err; |
284 | dev->out.dbdma = ioremap(r->start, rlen); | 283 | dev->out.dbdma = ioremap(r->start, rlen); |
285 | 284 | ||
286 | r = &dev->resources[aoa_resource_rxdbdma]; | 285 | r = &dev->resources[aoa_resource_rxdbdma]; |
287 | rlen = r->end - r->start + 1; | 286 | rlen = resource_size(r); |
288 | if (rlen < sizeof(struct dbdma_regs)) | 287 | if (rlen < sizeof(struct dbdma_regs)) |
289 | goto err; | 288 | goto err; |
290 | dev->in.dbdma = ioremap(r->start, rlen); | 289 | dev->in.dbdma = ioremap(r->start, rlen); |