[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439581034-5972-2-git-send-email-dustin@cumulusnetworks.com>
Date: Fri, 14 Aug 2015 12:37:14 -0700
From: Dustin Byford <dustin@...ulusnetworks.com>
To: Wolfram Sang <wsa@...-dreams.de>, linux-i2c@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, jarkko.nikula@...ux.intel.com,
jdelvare@...e.com, linux@...ck-us.net, lm-sensors@...sensors.org,
rjw@...ysocki.net, linux-acpi@...r.kernel.org
Subject: [RFC 1/1] i2c: acpi: revert setting a "stable" device name
70762ab from 11/2014 (i2c: Use stable dev_name for ACPI enumerated I2C
slaves) modified the sysfs-visible dev_name() for ACPI enumerated I2C
devices. With that change, /sys/bus/i2c/devices/i2c-0-004a, for
example, became /sys/bus/i2c/devices/i2c-PNPXXXX:xx
That causes problems for userspace code such as 'sensors' which does
this:
lib/sysfs.c:665:
if ((!subsys || !strcmp(subsys, "i2c")) &&
sscanf(dev_name, "%hd-%x", &entry.chip.bus.nr,
&entry.chip.addr) == 2) {
...
Fix 'sensors' by reverting the kernel change.
Signed-off-by: Dustin Byford <dustin@...ulusnetworks.com>
---
drivers/i2c/i2c-core.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index c83e4d1..fb77031 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -916,13 +916,6 @@ EXPORT_SYMBOL_GPL(i2c_unlock_adapter);
static void i2c_dev_set_name(struct i2c_adapter *adap,
struct i2c_client *client)
{
- struct acpi_device *adev = ACPI_COMPANION(&client->dev);
-
- if (adev) {
- dev_set_name(&client->dev, "i2c-%s", acpi_dev_name(adev));
- return;
- }
-
/* For 10-bit clients, add an arbitrary offset to avoid collisions */
dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap),
client->addr | ((client->flags & I2C_CLIENT_TEN)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists