[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170822.102610.235105979872147384.davem@davemloft.net>
Date: Tue, 22 Aug 2017 10:26:10 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: f.fainelli@...il.com
Cc: netdev@...r.kernel.org, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, madalin.bucur@....com,
junote@...look.com, igal.liberman@...escale.com
Subject: Re: [PATCH RFC net] fsl/man: Inherit parent device and of_node
From: Florian Fainelli <f.fainelli@...il.com>
Date: Fri, 18 Aug 2017 17:12:55 -0700
> @@ -623,6 +623,8 @@ static struct platform_device *dpaa_eth_add_device(int fman_id,
> goto no_mem;
> }
>
> + pdev->dev.of_node = node;
> + pdev->dev.parent = priv->dev;
> set_dma_ops(&pdev->dev, get_dma_ops(priv->dev));
>
> ret = platform_device_add_data(pdev, &data, sizeof(data));
I guess since we allocate and manage the platform device here, we can
fumble around safely with it's device node pointer and parent.
So this should be ok.
Powered by blists - more mailing lists