aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 14:45:17 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:06 -0400
commit7b595756ec1f49e0049a9e01a1298d53a7faaa15 (patch)
treecd06687ab3e5c7a5a4ef91903dff207a18c4db76 /drivers/macintosh
parentdbde0fcf9f8f6d477af3c32d9979e789ee680cde (diff)
sysfs: kill unnecessary attribute->owner
sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/windfarm_core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 11ced17f438a..4fcb245ba184 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -212,7 +212,6 @@ int wf_register_control(struct wf_control *new_ct)
212 list_add(&new_ct->link, &wf_controls); 212 list_add(&new_ct->link, &wf_controls);
213 213
214 new_ct->attr.attr.name = new_ct->name; 214 new_ct->attr.attr.name = new_ct->name;
215 new_ct->attr.attr.owner = THIS_MODULE;
216 new_ct->attr.attr.mode = 0644; 215 new_ct->attr.attr.mode = 0644;
217 new_ct->attr.show = wf_show_control; 216 new_ct->attr.show = wf_show_control;
218 new_ct->attr.store = wf_store_control; 217 new_ct->attr.store = wf_store_control;
@@ -325,7 +324,6 @@ int wf_register_sensor(struct wf_sensor *new_sr)
325 list_add(&new_sr->link, &wf_sensors); 324 list_add(&new_sr->link, &wf_sensors);
326 325
327 new_sr->attr.attr.name = new_sr->name; 326 new_sr->attr.attr.name = new_sr->name;
328 new_sr->attr.attr.owner = THIS_MODULE;
329 new_sr->attr.attr.mode = 0444; 327 new_sr->attr.attr.mode = 0444;
330 new_sr->attr.show = wf_show_sensor; 328 new_sr->attr.show = wf_show_sensor;
331 new_sr->attr.store = NULL; 329 new_sr->attr.store = NULL;