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

fpga: fpga-mgr: socfpga: Simplify registration

Simplify registration using new devm_fpga_mgr_register() API.

Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Link: https://lore.kernel.org/r/20201115195127.284487-7-mdf@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Moritz Fischer and committed by
Greg Kroah-Hartman
20e8963f a3b79b2a

+1 -13
+1 -13
drivers/fpga/socfpga.c
··· 576 576 if (!mgr) 577 577 return -ENOMEM; 578 578 579 - platform_set_drvdata(pdev, mgr); 580 - 581 - return fpga_mgr_register(mgr); 582 - } 583 - 584 - static int socfpga_fpga_remove(struct platform_device *pdev) 585 - { 586 - struct fpga_manager *mgr = platform_get_drvdata(pdev); 587 - 588 - fpga_mgr_unregister(mgr); 589 - 590 - return 0; 579 + return devm_fpga_mgr_register(dev, mgr); 591 580 } 592 581 593 582 #ifdef CONFIG_OF ··· 590 601 591 602 static struct platform_driver socfpga_fpga_driver = { 592 603 .probe = socfpga_fpga_probe, 593 - .remove = socfpga_fpga_remove, 594 604 .driver = { 595 605 .name = "socfpga_fpga_manager", 596 606 .of_match_table = of_match_ptr(socfpga_fpga_of_match),