lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1392114529-30672-1-git-send-email-lpapp@kde.org>
Date:	Tue, 11 Feb 2014 10:28:49 +0000
From:	Laszlo Papp <lpapp@....org>
To:	jdelvare@...e.de
Cc:	linux@...ck-us.net, lm-sensors@...sensors.org,
	linux-kernel@...r.kernel.org, Laszlo Papp <lpapp@....org>
Subject: [PATCH v2] hwmon: (max6650) Dissociate the i2c device name from the hwmon device name

This is a necessary step to revamp the existing design of the driver for the
overall functionality the chip can provide. This will create a clean name-space
for each function.

Signed-off-by: Laszlo Papp <lpapp@....org>
---
 drivers/hwmon/max6650.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index 0cafc39..1e7a131 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -518,6 +518,7 @@ static struct attribute *max6650_attrs[] = {
 	&sensor_dev_attr_gpio2_alarm.dev_attr.attr,
 	NULL
 };
+ATTRIBUTE_GROUPS(max6650);
 
 static struct attribute_group max6650_attr_grp = {
 	.attrs = max6650_attrs,
@@ -573,8 +574,10 @@ static int max6650_probe(struct i2c_client *client,
 			goto err_remove;
 	}
 
-	data->hwmon_dev = hwmon_device_register(&client->dev);
-	if (!IS_ERR(data->hwmon_dev))
+	data->hwmon_dev = devm_hwmon_device_register_with_groups(&client->dev,
+							client->name, data,
+							max6650_groups);
+	if (!PTR_ERR_OR_ZERO(data->hwmon_dev))
 		return 0;
 
 	err = PTR_ERR(data->hwmon_dev);
-- 
1.8.5.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

Powered by Openwall GNU/*/Linux Powered by OpenVZ