soc/fsl/qe: Use resource_size
authorVaishali Thakkar <vaishali.thakkar@oracle.com>
Sat, 24 Sep 2016 06:40:06 +0000 (12:10 +0530)
committerScott Wood <oss@buserror.net>
Sun, 25 Sep 2016 03:46:55 +0000 (22:46 -0500)
Use the function resource_size instead of explicit computation.

Problem found using Coccinelle.

Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Signed-off-by: Scott Wood <oss@buserror.net>
drivers/soc/fsl/qe/qe_tdm.c

index 5e48b147017866dca9b98a1d2703d374a0d9c60b..124e222a0d1898131dc22deb337e556ad5e58886 100644 (file)
@@ -167,7 +167,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
        }
 
        if (siram_init_flag == 0) {
-               memset_io(utdm->siram, 0,  res->end - res->start + 1);
+               memset_io(utdm->siram, 0,  resource_size(res));
                siram_init_flag = 1;
        }