mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Driver core: bin_attribute parameters can often be const*
Many struct bin_attribute descriptors are purely read-only structures, and there's no need to change them. Therefore make the promise not to, which will let those descriptors be put in a ro section. Signed-off-by: Phil Carmody <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
26579ab70a
commit
66ecb92be9
4 changed files with 16 additions and 11 deletions
|
|
@ -483,7 +483,8 @@ void unmap_bin_file(struct sysfs_dirent *attr_sd)
|
|||
* @attr: attribute descriptor.
|
||||
*/
|
||||
|
||||
int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
|
||||
int sysfs_create_bin_file(struct kobject *kobj,
|
||||
const struct bin_attribute *attr)
|
||||
{
|
||||
BUG_ON(!kobj || !kobj->sd || !attr);
|
||||
|
||||
|
|
@ -497,7 +498,8 @@ int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
|
|||
* @attr: attribute descriptor.
|
||||
*/
|
||||
|
||||
void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr)
|
||||
void sysfs_remove_bin_file(struct kobject *kobj,
|
||||
const struct bin_attribute *attr)
|
||||
{
|
||||
sysfs_hash_and_remove(kobj->sd, attr->attr.name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue