sysfs: sysfs_chmod_file's attr can be const

sysfs_chmod_file doesn't change the attribute it operates on, so this
attribute can be marked const.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
此提交包含在:
Jean Delvare
2010-07-02 16:54:05 +02:00
提交者 Greg Kroah-Hartman
父節點 3317fad5e9
當前提交 49c19400f6
共有 2 個檔案被更改,包括 5 行新增4 行删除

查看文件

@@ -593,7 +593,8 @@ EXPORT_SYMBOL_GPL(sysfs_add_file_to_group);
* @mode: file permissions.
*
*/
int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode)
int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr,
mode_t mode)
{
struct sysfs_dirent *sd;
struct iattr newattrs;