Commit bbbdc23e authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Greg Kroah-Hartman

staging: gs_fpgaboot: drop wrapper function 'finish_driver'

Remove the function 'finish_driver' since a direct call to
platform_device_unregister() is intuitive enough to signify the original
intention of the function being removed. Coccinelle semantic patch used to
detect this:

@@
identifier wrapper, func;
type T;
@@

*T wrapper(...)
{
(
	return func(...);
|
	func(...);
)
}
Signed-off-by: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18f038e6
...@@ -281,11 +281,6 @@ static int init_driver(void) ...@@ -281,11 +281,6 @@ static int init_driver(void)
return PTR_ERR_OR_ZERO(firmware_pdev); return PTR_ERR_OR_ZERO(firmware_pdev);
} }
static void finish_driver(void)
{
platform_device_unregister(firmware_pdev);
}
static int gs_fpgaboot(void) static int gs_fpgaboot(void)
{ {
int err; int err;
...@@ -370,14 +365,14 @@ static int __init gs_fpgaboot_init(void) ...@@ -370,14 +365,14 @@ static int __init gs_fpgaboot_init(void)
return 0; return 0;
errout: errout:
finish_driver(); platform_device_unregister(firmware_pdev);
return err; return err;
} }
static void __exit gs_fpgaboot_exit(void) static void __exit gs_fpgaboot_exit(void)
{ {
finish_driver(); platform_device_unregister(firmware_pdev);
pr_info("FPGA image download module removed\n"); pr_info("FPGA image download module removed\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment