From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'David S. Miller'" <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH 06/31] net: macb: use dev_get_platdata()
Date: Fri, 30 Aug 2013 09:54:12 +0200 [thread overview]
Message-ID: <52204FA4.3060700@atmel.com> (raw)
In-Reply-To: <005801cea53f$815de4a0$8419ade0$%han@samsung.com>
On 30/08/2013 07:12, Jingoo Han :
> Use the wrapper function for retrieving the platform data instead of
> accessing dev->platform_data directly. This is a cosmetic change
> to make the code simpler and enhance the readability.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/net/ethernet/cadence/macb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index fe06ab0..20f94d1 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -125,7 +125,7 @@ void macb_get_hwaddr(struct macb *bp)
> u8 addr[6];
> int i;
>
> - pdata = bp->pdev->dev.platform_data;
> + pdata = dev_get_platdata(&bp->pdev->dev);
>
> /* Check all 4 address register for vaild address */
> for (i = 0; i < 4; i++) {
> @@ -335,7 +335,7 @@ int macb_mii_init(struct macb *bp)
> bp->pdev->name, bp->pdev->id);
> bp->mii_bus->priv = bp;
> bp->mii_bus->parent = &bp->dev->dev;
> - pdata = bp->pdev->dev.platform_data;
> + pdata = dev_get_platdata(&bp->pdev->dev);
>
> bp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
> if (!bp->mii_bus->irq) {
> @@ -1851,7 +1851,7 @@ static int __init macb_probe(struct platform_device *pdev)
>
> err = of_get_phy_mode(pdev->dev.of_node);
> if (err < 0) {
> - pdata = pdev->dev.platform_data;
> + pdata = dev_get_platdata(&pdev->dev);
> if (pdata && pdata->is_rmii)
> bp->phy_interface = PHY_INTERFACE_MODE_RMII;
> else
>
--
Nicolas Ferre
next prev parent reply other threads:[~2013-08-30 7:54 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 4:44 [PATCH 01/31] net: ax88796: use dev_get_platdata() Jingoo Han
2013-08-30 4:50 ` [PATCH 02/31] net: bfin_mac: " Jingoo Han
2013-08-30 4:51 ` [PATCH 03/31] net: au1000_eth: " Jingoo Han
2013-08-30 4:52 ` [PATCH 04/31] net: bcm63xx_enet: " Jingoo Han
2013-08-30 4:54 ` [PATCH 07/31] net: ep93xx_eth: " Jingoo Han
2013-08-30 4:55 ` [PATCH 08/31] net: dm9000: " Jingoo Han
2013-08-30 4:55 ` [PATCH 09/31] net: ethoc: " Jingoo Han
2013-08-30 4:56 ` [PATCH 10/31] net: fec: " Jingoo Han
2013-08-30 5:23 ` Duan Fugang-B38611
2013-08-30 4:57 ` [PATCH 11/31] net: mv643xx_eth: " Jingoo Han
2013-08-30 4:58 ` [PATCH 12/31] net: pxa168_eth: " Jingoo Han
2013-08-30 4:58 ` [PATCH 13/31] net: ks8842: " Jingoo Han
2013-08-30 4:59 ` [PATCH 14/31] net: ks8851-ml: " Jingoo Han
2013-08-30 4:59 ` [PATCH 15/31] net: netx-eth: " Jingoo Han
2013-08-31 18:17 ` Sergei Shtylyov
2013-08-30 5:00 ` [PATCH 16/31] net: sh_eth: " Jingoo Han
2013-08-30 5:00 ` [PATCH 17/31] net: seeq: " Jingoo Han
2013-08-30 5:01 ` [PATCH 18/31] net: smc91x: " Jingoo Han
2013-08-30 5:02 ` [PATCH 19/31] net: smc911x: " Jingoo Han
2013-08-30 5:02 ` [PATCH 20/31] net: smsc911x: " Jingoo Han
2013-08-30 5:04 ` [PATCH 22/31] net: niu: " Jingoo Han
2013-08-30 5:05 ` [PATCH 23/31] net: cpmac: " Jingoo Han
2013-08-30 5:05 ` [PATCH 24/31] net: davinci_emac: " Jingoo Han
2013-08-30 5:17 ` Mugunthan V N
2013-08-30 5:06 ` [PATCH 25/31] net: davinci_mdio: " Jingoo Han
2013-08-30 5:18 ` Mugunthan V N
2013-08-30 5:06 ` [PATCH 26/31] net: tsi108: " Jingoo Han
2013-08-30 5:07 ` [PATCH 27/31] net: w5300: " Jingoo Han
2013-08-30 5:07 ` [PATCH 28/31] net: w5100: " Jingoo Han
2013-08-30 5:08 ` [PATCH 29/31] net: ixp4xx_eth: " Jingoo Han
2013-08-30 5:08 ` [PATCH 30/31] net: mdio-gpio: " Jingoo Han
2013-08-30 5:09 ` [PATCH 31/31] net: mdio-mux-gpio: " Jingoo Han
2013-08-30 5:11 ` [PATCH 05/31] net: at91_ether: " Jingoo Han
2013-08-30 7:53 ` Nicolas Ferre
2013-08-30 5:12 ` [PATCH 06/31] net: macb: " Jingoo Han
2013-08-30 7:54 ` Nicolas Ferre [this message]
2013-08-30 5:13 ` [PATCH 21/31] net: stmmac: " Jingoo Han
2013-08-30 21:45 ` [PATCH 01/31] net: ax88796: " David Miller
2013-08-31 18:14 ` Sergei Shtylyov
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=52204FA4.3060700@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=davem@davemloft.net \
--cc=jg1.han@samsung.com \
--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 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.