From: Florian Fainelli <f.fainelli@gmail.com>
To: Dan Murphy <dmurphy@ti.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
andrew@lunn.ch, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] net: phy: dp83869: Add TI dp83869 phy
Date: Tue, 5 Nov 2019 12:05:25 -0800 [thread overview]
Message-ID: <5d5cb879-b3a2-545f-7f74-0f1f1e6380bb@gmail.com> (raw)
In-Reply-To: <4ffebfad-87d2-0e19-5b54-7e550c540d03@ti.com>
On 11/5/19 12:02 PM, Dan Murphy wrote:
int ret, val;
>>> +
>>> + if (!phydev->priv) {
>>> + dp83869 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83869),
>>> + GFP_KERNEL);
>> This belongs into the probe callback.
> probe callback? Why do I need a probe function?
To allocate your driver private memory and do that just once,
config_init() can be called multiple times through the lifetime of your
PHY device driver, including but not limited to: phy_connect(),
phy_init_hw(), phy_resume() etc. etc.
--
Florian
next prev parent reply other threads:[~2019-11-05 20:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 18:18 [PATCH 1/2] dt-bindings: net: dp83869: Add TI dp83869 phy Dan Murphy
2019-11-05 18:18 ` [PATCH 2/2] net: phy: " Dan Murphy
2019-11-05 19:55 ` Heiner Kallweit
2019-11-05 20:02 ` Dan Murphy
2019-11-05 20:05 ` Florian Fainelli [this message]
2019-11-05 20:08 ` Dan Murphy
2019-11-05 20:20 ` Heiner Kallweit
2019-11-05 20:26 ` Dan Murphy
2019-11-05 20:48 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d5cb879-b3a2-545f-7f74-0f1f1e6380bb@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dmurphy@ti.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox