Skip to content

Commit c843b38

Browse files
saschahauergroeck
authored andcommitted
hwmon: (jc42) Fix name to have no illegal characters
The jc42 driver passes I2C client's name as hwmon device name. In case of device tree probed devices this ends up being part of the compatible string, "jc-42.4-temp". This name contains hyphens and the hwmon core doesn't like this: jc42 2-0018: hwmon: 'jc-42.4-temp' is not a valid name attribute, please fix This changes the name to "jc42" which doesn't have any illegal characters. Signed-off-by: Sascha Hauer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 0e786f3 commit c843b38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/jc42.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static int jc42_probe(struct i2c_client *client, const struct i2c_device_id *id)
506506
}
507507
data->config = config;
508508

509-
hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
509+
hwmon_dev = devm_hwmon_device_register_with_info(dev, "jc42",
510510
data, &jc42_chip_info,
511511
NULL);
512512
return PTR_ERR_OR_ZERO(hwmon_dev);

0 commit comments

Comments
 (0)