mirror of https://gitee.com/openkylin/linux.git
ARM: davinci: dm644x: remove unnecessary postcore_initcall()
dm644x_init_devices() is unnecessarily implemented as a postcore_initcall(). This does not cause any issues now, but creates issues when converting to common clock framework where clocks themselves become platform devices and are initialized later. Because of this, device clock acquisition and runtime PM on that device fails. Move the call to .init_machine() callback along with rest of platform device's registration. While at it, convert it to return void since return value is ignored by caller anyway. Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
parent
60cc43fc88
commit
8e730c7f90
|
@ -768,6 +768,8 @@ static __init void davinci_evm_init(void)
|
|||
struct clk *aemif_clk;
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
|
||||
dm644x_init_devices();
|
||||
|
||||
ret = dm644x_gpio_register();
|
||||
if (ret)
|
||||
pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
|
||||
|
|
|
@ -174,6 +174,8 @@ static __init void davinci_ntosd2_init(void)
|
|||
struct clk *aemif_clk;
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
|
||||
dm644x_init_devices();
|
||||
|
||||
ret = dm644x_gpio_register();
|
||||
if (ret)
|
||||
pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
|
||||
|
|
|
@ -134,6 +134,8 @@ static __init void davinci_sffsdr_init(void)
|
|||
{
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
|
||||
dm644x_init_devices();
|
||||
|
||||
platform_add_devices(davinci_sffsdr_devices,
|
||||
ARRAY_SIZE(davinci_sffsdr_devices));
|
||||
sffsdr_init_i2c();
|
||||
|
|
|
@ -104,6 +104,7 @@ int dm365_gpio_register(void);
|
|||
|
||||
/* DM644x function declarations */
|
||||
void dm644x_init(void);
|
||||
void dm644x_init_devices(void);
|
||||
void dm644x_init_time(void);
|
||||
void dm644x_init_asp(void);
|
||||
int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
|
||||
|
|
|
@ -961,19 +961,14 @@ int __init dm644x_init_video(struct vpfe_config *vpfe_cfg,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __init dm644x_init_devices(void)
|
||||
void __init dm644x_init_devices(void)
|
||||
{
|
||||
struct platform_device *edma_pdev;
|
||||
int ret = 0;
|
||||
|
||||
if (!cpu_is_davinci_dm644x())
|
||||
return 0;
|
||||
int ret;
|
||||
|
||||
edma_pdev = platform_device_register_full(&dm644x_edma_device);
|
||||
if (IS_ERR(edma_pdev)) {
|
||||
if (IS_ERR(edma_pdev))
|
||||
pr_warn("%s: Failed to register eDMA\n", __func__);
|
||||
return PTR_ERR(edma_pdev);
|
||||
}
|
||||
|
||||
platform_device_register(&dm644x_mdio_device);
|
||||
platform_device_register(&dm644x_emac_device);
|
||||
|
@ -982,6 +977,4 @@ static int __init dm644x_init_devices(void)
|
|||
if (ret)
|
||||
pr_warn("%s: watchdog init failed: %d\n", __func__, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
postcore_initcall(dm644x_init_devices);
|
||||
|
|
Loading…
Reference in New Issue