Commit 50c959fc authored by Lukasz Czerwinski's avatar Lukasz Czerwinski Committed by Mark Brown

spi: spi-s3c64xx: Use module_platform_driver()

subsys_init_call() initializes driver too early.
It's preventing to move DMA channel allocation at the begining
(driver probe).

This patch reduces and simplifies initalization code by
using module_platform_driver() macro.
It's also efficiently delaying driver startup.
Signed-off-by: default avatarLukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 272b98c6
...@@ -1633,22 +1633,13 @@ static struct platform_driver s3c64xx_spi_driver = { ...@@ -1633,22 +1633,13 @@ static struct platform_driver s3c64xx_spi_driver = {
.pm = &s3c64xx_spi_pm, .pm = &s3c64xx_spi_pm,
.of_match_table = of_match_ptr(s3c64xx_spi_dt_match), .of_match_table = of_match_ptr(s3c64xx_spi_dt_match),
}, },
.probe = s3c64xx_spi_probe,
.remove = s3c64xx_spi_remove, .remove = s3c64xx_spi_remove,
.id_table = s3c64xx_spi_driver_ids, .id_table = s3c64xx_spi_driver_ids,
}; };
MODULE_ALIAS("platform:s3c64xx-spi"); MODULE_ALIAS("platform:s3c64xx-spi");
static int __init s3c64xx_spi_init(void) module_platform_driver(s3c64xx_spi_driver);
{
return platform_driver_probe(&s3c64xx_spi_driver, s3c64xx_spi_probe);
}
subsys_initcall(s3c64xx_spi_init);
static void __exit s3c64xx_spi_exit(void)
{
platform_driver_unregister(&s3c64xx_spi_driver);
}
module_exit(s3c64xx_spi_exit);
MODULE_AUTHOR("Jaswinder Singh <jassi.brar@samsung.com>"); MODULE_AUTHOR("Jaswinder Singh <jassi.brar@samsung.com>");
MODULE_DESCRIPTION("S3C64XX SPI Controller Driver"); MODULE_DESCRIPTION("S3C64XX SPI Controller Driver");
......
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