netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Woojung.Huh@microchip.com
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] lan78xx: replace devid to chipid & chiprev
Date: Wed, 10 Feb 2016 23:45:58 +0100	[thread overview]
Message-ID: <20160210224558.GB14610@lunn.ch> (raw)
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D404AB9F2@CHN-SV-EXMX02.mchp-main.com>

On Wed, Feb 10, 2016 at 09:13:37PM +0000, Woojung.Huh@microchip.com wrote:
> 
> Replace devid to chipid & chiprev for easy access.
> 
> Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
> ---
>  drivers/net/usb/lan78xx.c | 20 +++++++++++---------
>  drivers/net/usb/lan78xx.h |  1 +
>  2 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 1c299b8..b14b22d 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -278,7 +278,8 @@ struct lan78xx_net {
>  	int			link_on;
>  	u8			mdix_ctrl;
>  
> -	u32			devid;
> +	u32			chipid;
> +	u32			chiprev;
>  	struct mii_bus		*mdiobus;
>  };
>  
> @@ -471,7 +472,7 @@ static int lan78xx_read_raw_eeprom(struct lan78xx_net *dev, u32 offset,
>  	 */
>  	ret = lan78xx_read_reg(dev, HW_CFG, &val);
>  	saved = val;
> -	if ((dev->devid & ID_REV_CHIP_ID_MASK_) == 0x78000000) {
> +	if ((dev->chipid) == ID_REV_CHIP_ID_7800_) {

Why the extra ( ... )?

    Andrew

      parent reply	other threads:[~2016-02-10 22:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 21:13 [PATCH net-next 1/3] lan78xx: replace devid to chipid & chiprev Woojung.Huh
2016-02-10 21:36 ` Sergei Shtylyov
2016-02-10 22:49   ` Woojung.Huh
2016-02-10 22:45 ` Andrew Lunn [this message]

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=20160210224558.GB14610@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Woojung.Huh@microchip.com \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).