summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/mgb4/mgb4_regs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/mgb4/mgb4_regs.c')
-rw-r--r--drivers/media/pci/mgb4/mgb4_regs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/mgb4/mgb4_regs.c b/drivers/media/pci/mgb4/mgb4_regs.c
index 53d4e4503a..31befd722d 100644
--- a/drivers/media/pci/mgb4/mgb4_regs.c
+++ b/drivers/media/pci/mgb4/mgb4_regs.c
@@ -10,7 +10,7 @@
int mgb4_regs_map(struct resource *res, struct mgb4_regs *regs)
{
regs->mapbase = res->start;
- regs->mapsize = res->end - res->start;
+ regs->mapsize = resource_size(res);
if (!request_mem_region(regs->mapbase, regs->mapsize, res->name))
return -EINVAL;