Merge branch 'for-linus-3.4' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf
[platform/adaptation/renesas_rcar/renesas_kernel.git] / net / rfkill / rfkill-gpio.c
index 128677d..865adb6 100644 (file)
@@ -105,7 +105,7 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
                ret = pdata->gpio_runtime_setup(pdev);
                if (ret) {
                        pr_warn("%s: can't set up gpio\n", __func__);
-                       return ret;
+                       goto fail_alloc;
                }
        }
 
@@ -220,18 +220,7 @@ static struct platform_driver rfkill_gpio_driver = {
        },
 };
 
-static int __init rfkill_gpio_init(void)
-{
-       return platform_driver_register(&rfkill_gpio_driver);
-}
-
-static void __exit rfkill_gpio_exit(void)
-{
-       platform_driver_unregister(&rfkill_gpio_driver);
-}
-
-module_init(rfkill_gpio_init);
-module_exit(rfkill_gpio_exit);
+module_platform_driver(rfkill_gpio_driver);
 
 MODULE_DESCRIPTION("gpio rfkill");
 MODULE_AUTHOR("NVIDIA");