diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2014-11-04 01:25:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-04 17:18:45 -0500 |
commit | 30349bdbc4da5ecf0efa25556e3caff9c9b8c5f7 (patch) | |
tree | b2f992c919aad35db2788fd5108b94e12b0fc69f | |
parent | 6cf1093e58f5c103840cf361721b6e346ec2275d (diff) | |
download | linux-exynos-30349bdbc4da5ecf0efa25556e3caff9c9b8c5f7.tar.gz linux-exynos-30349bdbc4da5ecf0efa25556e3caff9c9b8c5f7.tar.bz2 linux-exynos-30349bdbc4da5ecf0efa25556e3caff9c9b8c5f7.zip |
net: phy: spi_ks8995: remove sysfs bin file by registered attribute
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>
-rw-r--r-- | drivers/net/phy/spi_ks8995.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c index eab57fc5b967..46530159256b 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; } |