From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: Greg KH <gregkh@suse.de>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Lin Ming <ming.m.lin@intel.com>, Len Brown <lenb@kernel.org>
Subject: [PATCH] Fix key f70f4b50 not in .data in thermal_sys V2
Date: Mon, 22 Mar 2010 16:45:03 +0200 [thread overview]
Message-ID: <20100322144503.GD3388@swordfish.minsk.epam.com> (raw)
In-Reply-To: <20100322140713.GB1076@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]
Initialize sysfs attributes before device_create_file call.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5066de5..ecb181d 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -505,6 +505,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
tz->temp_input.attr.attr.name = tz->temp_input.name;
tz->temp_input.attr.attr.mode = 0444;
tz->temp_input.attr.show = temp_input_show;
+ sysfs_attr_init(&tz->temp_input.attr.attr);
result = device_create_file(hwmon->device, &tz->temp_input.attr);
if (result)
goto unregister_hwmon_device;
@@ -517,6 +518,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
tz->temp_crit.attr.attr.name = tz->temp_crit.name;
tz->temp_crit.attr.attr.mode = 0444;
tz->temp_crit.attr.show = temp_crit_show;
+ sysfs_attr_init(&tz->temp_crit.attr.attr);
result = device_create_file(hwmon->device,
&tz->temp_crit.attr);
if (result)
@@ -725,6 +727,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
goto release_idr;
sprintf(dev->attr_name, "cdev%d_trip_point", dev->id);
+ sysfs_attr_init(&dev->attr.attr);
dev->attr.attr.name = dev->attr_name;
dev->attr.attr.mode = 0444;
dev->attr.show = thermal_cooling_device_trip_point_show;
[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]
next prev parent reply other threads:[~2010-03-22 14:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 10:27 BUG: key f70f4b50 not in .data Sergey Senozhatsky
2010-03-09 14:18 ` Greg KH
2010-03-22 13:15 ` [PATCH] Fix key f70f4b50 not in .data in thermal_sys Sergey Senozhatsky
2010-03-22 13:31 ` Wolfram Sang
2010-03-22 13:54 ` Sergey Senozhatsky
2010-03-22 13:52 ` Sergey Senozhatsky
2010-03-22 14:07 ` Wolfram Sang
2010-03-22 14:45 ` Sergey Senozhatsky [this message]
2010-04-05 0:17 ` [PATCH] Fix key f70f4b50 not in .data in thermal_sys V2 Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100322144503.GD3388@swordfish.minsk.epam.com \
--to=sergey.senozhatsky@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=w.sang@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.