mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	perf/arm-cci: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
		
							parent
							
								
									1c8d96b41d
								
							
						
					
					
						commit
						504db0f826
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		|  | @ -1642,7 +1642,6 @@ static struct cci_pmu *cci_pmu_alloc(struct device *dev) | |||
| 
 | ||||
| static int cci_pmu_probe(struct platform_device *pdev) | ||||
| { | ||||
| 	struct resource *res; | ||||
| 	struct cci_pmu *cci_pmu; | ||||
| 	int i, ret, irq; | ||||
| 
 | ||||
|  | @ -1650,8 +1649,7 @@ static int cci_pmu_probe(struct platform_device *pdev) | |||
| 	if (IS_ERR(cci_pmu)) | ||||
| 		return PTR_ERR(cci_pmu); | ||||
| 
 | ||||
| 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||||
| 	cci_pmu->base = devm_ioremap_resource(&pdev->dev, res); | ||||
| 	cci_pmu->base = devm_platform_ioremap_resource(pdev, 0); | ||||
| 	if (IS_ERR(cci_pmu->base)) | ||||
| 		return -ENOMEM; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 YueHaibing
						YueHaibing