forked from mirrors/linux
		
	gpio: em: use the managed version of gpiochip_add_data()
Use the managed variant of gpiochip_add_data() and remove the call to gpiochip_remove(). Cc: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
		
							parent
							
								
									715ed72801
								
							
						
					
					
						commit
						8764c4ca50
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
					@ -359,7 +359,7 @@ static int em_gio_probe(struct platform_device *pdev)
 | 
				
			||||||
		goto err1;
 | 
							goto err1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = gpiochip_add_data(gpio_chip, p);
 | 
						ret = devm_gpiochip_add_data(&pdev->dev, gpio_chip, p);
 | 
				
			||||||
	if (ret) {
 | 
						if (ret) {
 | 
				
			||||||
		dev_err(&pdev->dev, "failed to add GPIO controller\n");
 | 
							dev_err(&pdev->dev, "failed to add GPIO controller\n");
 | 
				
			||||||
		goto err1;
 | 
							goto err1;
 | 
				
			||||||
| 
						 | 
					@ -376,8 +376,6 @@ static int em_gio_remove(struct platform_device *pdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct em_gio_priv *p = platform_get_drvdata(pdev);
 | 
						struct em_gio_priv *p = platform_get_drvdata(pdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gpiochip_remove(&p->gpio_chip);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	irq_domain_remove(p->irq_domain);
 | 
						irq_domain_remove(p->irq_domain);
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue