From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org
Cc: Randy Dunlap <rdunlap@infradead.org>,
Jonathan Cameron <jic23@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
prabhakar.csengg@gmail.com, santosh.shilimkar@ti.com,
Sekhar Nori <nsekhar@ti.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
davinci-linux-open-source@linux.davincidsp.com
Subject: Re: [PATCH v2 1/4] mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free
Date: Fri, 18 Apr 2014 21:48:28 +0400 [thread overview]
Message-ID: <5351656C.6070108@cogentembedded.com> (raw)
In-Reply-To: <1397841897-9170-2-git-send-email-grygorii.strashko@ti.com>
Hello.
On 04/18/2014 09:24 PM, Grygorii Strashko wrote:
> Add a resource managed devm_mdiobus_alloc()/devm_mdiobus_free()
> to automatically clean up MDIO bus alocations made by MDIO drivers,
> thus leading to simplified MDIO drivers code.
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
[...]
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 76f54b3..6412beb 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -69,6 +69,74 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
[...]
> +/**
> + * devm_mdiobus_free - Resource-managed mdiobus_free()
> + * @dev: Device this mii_bus belongs to
> + * @bus: the mii_bus associated with the device
> + *
> + * Free mii_bus allocated with devm_mdiobus_alloc().
> + */
> +void devm_mdiobus_free(struct device *dev, struct mii_bus *bus)
> +{
> + int rc;
> +
> + rc = devres_release(dev, _devm_mdiobus_free,
> + devm_mdiobus_match, bus);
Please re-align this line, so that it starts right under 'dev' on the
previous line.
WBR, Sergei
next prev parent reply other threads:[~2014-04-18 17:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 17:24 [PATCH v2 0/4] introduce devm_mdiobus_alloc/free and clean up davinci mdio Grygorii Strashko
2014-04-18 17:24 ` [PATCH v2 1/4] mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free Grygorii Strashko
2014-04-18 17:24 ` Grygorii Strashko
2014-04-18 17:48 ` Sergei Shtylyov [this message]
2014-04-18 17:52 ` Sergei Shtylyov
2014-04-30 12:25 ` Grygorii Strashko
2014-04-18 17:24 ` [PATCH v2 2/4] net: davinci_mdio: use devm_* api Grygorii Strashko
2014-04-18 17:24 ` Grygorii Strashko
2014-04-18 17:24 ` [PATCH v2 3/4] net: davinci_mdio: drop pinctrl_pm_select_default_state from probe Grygorii Strashko
2014-04-18 17:24 ` [PATCH 4/4] net: davinci_mdio: simplify IO memory mapping Grygorii Strashko
2014-04-19 12:32 ` [PATCH v2 0/4] introduce devm_mdiobus_alloc/free and clean up davinci mdio Prabhakar Lad
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=5351656C.6070108@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=f.fainelli@gmail.com \
--cc=grygorii.strashko@ti.com \
--cc=jic23@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=prabhakar.csengg@gmail.com \
--cc=rdunlap@infradead.org \
--cc=santosh.shilimkar@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.