From 5bda6a295c0c4c3bba043d3c789413f37fe82d0f Mon Sep 17 00:00:00 2001 From: Arulpandiyan Vadivel Date: Tue, 9 Apr 2019 14:30:29 +0530 Subject: [PATCH] MLK-21576 Revert "soc: imx: gpc: Do not pass static memory as platform data" This reverts commit f54e714cfc53b9164d1206f9ee49042195532a51. This patch breaks the suspend and resume functionality in all imx6 boards. Signed-off-by: Arulpandiyan Vadivel --- drivers/soc/imx/gpc.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c index d507dac00d75..aec294fe59a5 100644 --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c @@ -699,25 +699,17 @@ static int imx_gpc_probe(struct platform_device *pdev) if (domain_index >= of_id_data->num_domains) continue; + domain = &imx_gpc_domains[domain_index]; + domain->regmap = regmap; + domain->ipg_rate_mhz = ipg_rate_mhz; + pd_pdev = platform_device_alloc("imx-pgc-power-domain", domain_index); if (!pd_pdev) { of_node_put(np); return -ENOMEM; } - - ret = platform_device_add_data(pd_pdev, - &imx_gpc_domains[domain_index], - sizeof(imx_gpc_domains[domain_index])); - if (ret) { - platform_device_put(pd_pdev); - of_node_put(np); - return ret; - } - domain = pd_pdev->dev.platform_data; - domain->regmap = regmap; - domain->ipg_rate_mhz = ipg_rate_mhz; - + pd_pdev->dev.platform_data = domain; pd_pdev->dev.parent = &pdev->dev; pd_pdev->dev.of_node = np; -- 2.17.1