Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hwrng: mxc-rnga - use devm_platform_ioremap_resource() to simplify code

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Anson Huang and committed by
Herbert Xu
f2f1d75a d10d094c

+1 -3
+1 -3
drivers/char/hw_random/mxc-rnga.c
··· 134 134 static int __init mxc_rnga_probe(struct platform_device *pdev) 135 135 { 136 136 int err; 137 - struct resource *res; 138 137 struct mxc_rng *mxc_rng; 139 138 140 139 mxc_rng = devm_kzalloc(&pdev->dev, sizeof(*mxc_rng), GFP_KERNEL); ··· 157 158 if (err) 158 159 return err; 159 160 160 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 161 - mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res); 161 + mxc_rng->mem = devm_platform_ioremap_resource(pdev, 0); 162 162 if (IS_ERR(mxc_rng->mem)) { 163 163 err = PTR_ERR(mxc_rng->mem); 164 164 goto err_ioremap;