Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30349bdb authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by David S. Miller
Browse files

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: default avatarVladimir Zapolskiy <vz@mleia.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6cf1093e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}