All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 5/5] hwmon: (s3c) Initialize sysfs attributes
@ 2011-05-24 19:48 Guenter Roeck
  2011-06-11 10:01 ` [lm-sensors] [PATCH 5/5] hwmon: (s3c) Initialize sysfs Jean Delvare
  2011-06-11 16:11 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Guenter Roeck @ 2011-05-24 19:48 UTC (permalink / raw)
  To: lm-sensors

Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
---
Compile tested only.

 drivers/hwmon/s3c-hwmon.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
index 92b42db..731d1f3 100644
--- a/drivers/hwmon/s3c-hwmon.c
+++ b/drivers/hwmon/s3c-hwmon.c
@@ -232,6 +232,7 @@ static int s3c_hwmon_create_attr(struct device *dev,
 
 	attr = &attrs->in;
 	attr->index = channel;
+	sysfs_attr_init(&attr->dev_attr.attr);
 	attr->dev_attr.attr.name  = attrs->in_name;
 	attr->dev_attr.attr.mode  = S_IRUGO;
 	attr->dev_attr.show = s3c_hwmon_ch_show;
-- 
1.7.3.1


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-11 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 19:48 [lm-sensors] [PATCH 5/5] hwmon: (s3c) Initialize sysfs attributes Guenter Roeck
2011-06-11 10:01 ` [lm-sensors] [PATCH 5/5] hwmon: (s3c) Initialize sysfs Jean Delvare
2011-06-11 16:11 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.