mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: Cornelia Huck <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
dbde0fcf9f
commit
7b595756ec
55 changed files with 44 additions and 135 deletions
|
|
@ -25,8 +25,7 @@ static spinlock_t cpufreq_stats_lock;
|
|||
|
||||
#define CPUFREQ_STATDEVICE_ATTR(_name,_mode,_show) \
|
||||
static struct freq_attr _attr_##_name = {\
|
||||
.attr = {.name = __stringify(_name), .owner = THIS_MODULE, \
|
||||
.mode = _mode, }, \
|
||||
.attr = {.name = __stringify(_name), .mode = _mode, }, \
|
||||
.show = _show,\
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ store_speed (struct cpufreq_policy *policy, const char *buf, size_t count)
|
|||
|
||||
static struct freq_attr freq_attr_scaling_setspeed =
|
||||
{
|
||||
.attr = { .name = "scaling_setspeed", .mode = 0644, .owner = THIS_MODULE },
|
||||
.attr = { .name = "scaling_setspeed", .mode = 0644 },
|
||||
.show = show_speed,
|
||||
.store = store_speed,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -199,7 +199,6 @@ static ssize_t show_available_freqs (struct cpufreq_policy *policy, char *buf)
|
|||
struct freq_attr cpufreq_freq_attr_scaling_available_freqs = {
|
||||
.attr = { .name = "scaling_available_frequencies",
|
||||
.mode = 0444,
|
||||
.owner=THIS_MODULE
|
||||
},
|
||||
.show = show_available_freqs,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue