@@ -909,27 +909,22 @@ static void __exit interrupt_stats_exit(void)
909
909
delete_gpe_attr_array ();
910
910
}
911
911
912
- static ssize_t
913
- acpi_show_profile (struct kobject * kobj , struct kobj_attribute * attr ,
914
- char * buf )
912
+ static ssize_t pm_profile_show (struct kobject * kobj , struct kobj_attribute * attr , char * buf )
915
913
{
916
914
return sprintf (buf , "%d\n" , acpi_gbl_FADT .preferred_profile );
917
915
}
918
916
919
- static const struct kobj_attribute pm_profile_attr =
920
- __ATTR (pm_profile , S_IRUGO , acpi_show_profile , NULL );
917
+ static const struct kobj_attribute pm_profile_attr = __ATTR_RO (pm_profile );
921
918
922
- static ssize_t hotplug_enabled_show (struct kobject * kobj ,
923
- struct kobj_attribute * attr , char * buf )
919
+ static ssize_t enabled_show (struct kobject * kobj , struct kobj_attribute * attr , char * buf )
924
920
{
925
921
struct acpi_hotplug_profile * hotplug = to_acpi_hotplug_profile (kobj );
926
922
927
923
return sprintf (buf , "%d\n" , hotplug -> enabled );
928
924
}
929
925
930
- static ssize_t hotplug_enabled_store (struct kobject * kobj ,
931
- struct kobj_attribute * attr ,
932
- const char * buf , size_t size )
926
+ static ssize_t enabled_store (struct kobject * kobj , struct kobj_attribute * attr ,
927
+ const char * buf , size_t size )
933
928
{
934
929
struct acpi_hotplug_profile * hotplug = to_acpi_hotplug_profile (kobj );
935
930
unsigned int val ;
@@ -941,9 +936,7 @@ static ssize_t hotplug_enabled_store(struct kobject *kobj,
941
936
return size ;
942
937
}
943
938
944
- static struct kobj_attribute hotplug_enabled_attr =
945
- __ATTR (enabled , S_IRUGO | S_IWUSR , hotplug_enabled_show ,
946
- hotplug_enabled_store );
939
+ static struct kobj_attribute hotplug_enabled_attr = __ATTR_RW (enabled );
947
940
948
941
static struct attribute * hotplug_profile_attrs [] = {
949
942
& hotplug_enabled_attr .attr ,
@@ -1001,9 +994,7 @@ static ssize_t force_remove_store(struct kobject *kobj,
1001
994
return size ;
1002
995
}
1003
996
1004
- static const struct kobj_attribute force_remove_attr =
1005
- __ATTR (force_remove , S_IRUGO | S_IWUSR , force_remove_show ,
1006
- force_remove_store );
997
+ static const struct kobj_attribute force_remove_attr = __ATTR_RW (force_remove );
1007
998
1008
999
int __init acpi_sysfs_init (void )
1009
1000
{
0 commit comments