Skip to content

Commit

Permalink
net: phy: spi_ks8995: remove sysfs bin file by registered attribute
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Zapolskiy authored and David S. Miller committed Nov 4, 2014
1 parent 6cf1093 commit 30349bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/phy/spi_ks8995.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 30349bd

Please sign in to comment.