diff options
author | Vasyl Gomonovych <gomonovych@gmail.com> | 2017-11-20 17:46:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-13 08:01:44 -0500 |
commit | 7bed816d3465f7c4f4dac08833c1e68dd5712a84 (patch) | |
tree | 0e30d2e8e3ae95373f8e41e200a5a3856d704403 /drivers/media/platform/sti | |
parent | baed3c4bc4c13de93e0dba0a26d601411ebcb389 (diff) | |
download | linux-7bed816d3465f7c4f4dac08833c1e68dd5712a84.tar.bz2 |
media: c8sectpfe: Use resource_size function on memory resource
To adapt fei->sram_size calculation via resource_size for memory size
calculation before, in fei->sram = devm_ioremap_resource(dev, res).
And make memory initialization range in
memset_io for fei->sram appropriate
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/sti')
-rw-r--r-- | drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 8bd19e61846d..ef529dfe1e8c 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -693,7 +693,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) if (IS_ERR(fei->sram)) return PTR_ERR(fei->sram); - fei->sram_size = res->end - res->start; + fei->sram_size = resource_size(res); fei->idle_irq = platform_get_irq_byname(pdev, "c8sectpfe-idle-irq"); if (fei->idle_irq < 0) { |