mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-22 04:31:58 +08:00
fsi: aspeed: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20191228190631.26777-1-tiny.windzz@gmail.com Signed-off-by: Joel Stanley <joel@jms.id.au>
This commit is contained in:
parent
38483e8fed
commit
a3469912f4
@ -533,7 +533,6 @@ static int tacoma_cabled_fsi_fixup(struct device *dev)
|
||||
static int fsi_master_aspeed_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct fsi_master_aspeed *aspeed;
|
||||
struct resource *res;
|
||||
int rc, links, reg;
|
||||
__be32 raw;
|
||||
|
||||
@ -549,8 +548,7 @@ static int fsi_master_aspeed_probe(struct platform_device *pdev)
|
||||
|
||||
aspeed->dev = &pdev->dev;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
aspeed->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
aspeed->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(aspeed->base))
|
||||
return PTR_ERR(aspeed->base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user