diff mbox series

memory: omap-gpmc: fixup wrongly hierarchy of the sub-devices

Message ID yxefg4ie4vxblxvr272jvzncxvj2t6xjfuisvmkt2jk663xgsu@o2ogbyepmg3z
State New
Headers show
Series memory: omap-gpmc: fixup wrongly hierarchy of the sub-devices | expand

Commit Message

Brock Zheng March 3, 2024, 8:18 a.m. UTC
On TI-AM335x,FPGA under GPMC local-bus can not work on 6.x kernel.

GPMC <--> FPGA  <--> sub-devices....

I found that the platform sub-devices are in wrongly organized
hierarchy.  The grandchildren are now under the GPMC device directly,
not under it's father(FPGA).

Signed-off-by: Brock.Zheng <yzheng@techyauld.com>
---
 drivers/memory/omap-gpmc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Roger Quadros March 5, 2024, 9:55 a.m. UTC | #1
On 03/03/2024 10:18, Brock Zheng wrote:
> On TI-AM335x,FPGA under GPMC local-bus can not work on 6.x kernel.
> 
> GPMC <--> FPGA  <--> sub-devices....
> 
> I found that the platform sub-devices are in wrongly organized
> hierarchy.  The grandchildren are now under the GPMC device directly,
> not under it's father(FPGA).
> 
> Signed-off-by: Brock.Zheng <yzheng@techyauld.com>

Acked-by: Roger Quadros <rogerq@kernel.org>
Krzysztof Kozlowski March 8, 2024, 4:48 p.m. UTC | #2
On 03/03/2024 09:18, Brock Zheng wrote:
> On TI-AM335x,FPGA under GPMC local-bus can not work on 6.x kernel.
> 
> GPMC <--> FPGA  <--> sub-devices....
> 
> I found that the platform sub-devices are in wrongly organized
> hierarchy.  The grandchildren are now under the GPMC device directly,
> not under it's father(FPGA).
> 
> Signed-off-by: Brock.Zheng <yzheng@techyauld.com>

Your SoB still has '.' between names. I can remove it while applying.
It is too late in the cycle for me to pick it up. I will take it after
the merge window.


Best regards,
Krzysztof
Krzysztof Kozlowski March 26, 2024, 9:09 a.m. UTC | #3
On 08/03/2024 17:48, Krzysztof Kozlowski wrote:
> On 03/03/2024 09:18, Brock Zheng wrote:
>> On TI-AM335x,FPGA under GPMC local-bus can not work on 6.x kernel.
>>
>> GPMC <--> FPGA  <--> sub-devices....
>>
>> I found that the platform sub-devices are in wrongly organized
>> hierarchy.  The grandchildren are now under the GPMC device directly,
>> not under it's father(FPGA).
>>
>> Signed-off-by: Brock.Zheng <yzheng@techyauld.com>
> 
> Your SoB still has '.' between names. I can remove it while applying.
> It is too late in the cycle for me to pick it up. I will take it after
> the merge window.

Although I wrote I could apply it, but:
1. There is still no fixes tag, even though I asked.
2. This is not marked as v2 and is attached to some other thread. Please
version your patches, so next one will be v3. Add changelog after ---.
Then send as a new patchset.

Please send v3 with above corrected.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 80d038884207..1f2568e43086 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2175,6 +2175,7 @@  static int gpmc_probe_generic_child(struct platform_device *pdev,
 	int ret, cs;
 	u32 val;
 	struct gpmc_device *gpmc = platform_get_drvdata(pdev);
+	struct platform_device *child_pdev = NULL;
 
 	if (of_property_read_u32(child, "reg", &cs) < 0) {
 		dev_err(&pdev->dev, "%pOF has no 'reg' property\n",
@@ -2330,11 +2331,12 @@  static int gpmc_probe_generic_child(struct platform_device *pdev,
 no_timings:
 
 	/* create platform device, NULL on error or when disabled */
-	if (!of_platform_device_create(child, NULL, &pdev->dev))
+	child_pdev = of_platform_device_create(child, NULL, &pdev->dev);
+	if (!child_pdev)
 		goto err_child_fail;
 
 	/* create children and other common bus children */
-	if (of_platform_default_populate(child, NULL, &pdev->dev))
+	if (of_platform_default_populate(child, NULL, &child_pdev->dev))
 		goto err_child_fail;
 
 	return 0;