All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Zapolskiy <vz@mleia.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] net: phy: spi_ks8995: remove sysfs bin file by registered attribute
Date: Tue, 04 Nov 2014 10:15:22 -0800	[thread overview]
Message-ID: <545917BA.50800@gmail.com> (raw)
In-Reply-To: <1415057109-8506-1-git-send-email-vz@mleia.com>

On 11/03/2014 03:25 PM, Vladimir Zapolskiy wrote:
> When a sysfs binary file is asked to be removed, it is found by
> attribute name, so strictly speaking this change is not a fix, but
> just in case when attribute name is changed in the driver or sysfs
> internals are changed, it might be better to remove the previously
> created file using right the same binary attribute.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
>  drivers/net/phy/spi_ks8995.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
> index eab57fc..4653015 100644
> --- a/drivers/net/phy/spi_ks8995.c
> +++ b/drivers/net/phy/spi_ks8995.c
> @@ -353,7 +353,9 @@ static int ks8995_probe(struct spi_device *spi)
>  
>  static int ks8995_remove(struct spi_device *spi)
>  {
> -	sysfs_remove_bin_file(&spi->dev.kobj, &ks8995_registers_attr);
> +	struct ks8995_switch *ks = spi_get_drvdata(spi);
> +
> +	sysfs_remove_bin_file(&spi->dev.kobj, &ks->regs_attr);
>  
>  	return 0;
>  }
> 

  reply	other threads:[~2014-11-04 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 23:25 [PATCH] net: phy: spi_ks8995: remove sysfs bin file by registered attribute Vladimir Zapolskiy
2014-11-04 18:15 ` Florian Fainelli [this message]
2014-11-04 22:19 ` David Miller

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=545917BA.50800@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vz@mleia.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.