[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1224177047-11859-38-git-send-email-gregkh@suse.de>
Date: Thu, 16 Oct 2008 10:10:39 -0700
From: Greg Kroah-Hartman <gregkh@...e.de>
To: linux-kernel@...r.kernel.org
Cc: Trent Piepho <tpiepho@...escale.com>, Neil Brown <neilb@...e.de>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH 38/46] sysfs: Make dir and name args to sysfs_notify() const
From: Trent Piepho <tpiepho@...escale.com>
Because they can be, and because code like this produces a warning if
they're not:
struct device_attribute dev_attr;
sysfs_notify(&kobj, NULL, dev_attr.attr.name);
Signed-off-by: Trent Piepho <tpiepho@...escale.com>
CC: Neil Brown <neilb@...e.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
fs/sysfs/file.c | 2 +-
include/linux/sysfs.h | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index d0d79e6..1f4a3f8 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -469,7 +469,7 @@ void sysfs_notify_dirent(struct sysfs_dirent *sd)
}
EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
-void sysfs_notify(struct kobject *k, char *dir, char *attr)
+void sysfs_notify(struct kobject *k, const char *dir, const char *attr)
{
struct sysfs_dirent *sd = k->sd;
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index d8e0230..b330e28 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -119,7 +119,7 @@ int sysfs_add_file_to_group(struct kobject *kobj,
void sysfs_remove_file_from_group(struct kobject *kobj,
const struct attribute *attr, const char *group);
-void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
+void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
void sysfs_notify_dirent(struct sysfs_dirent *sd);
struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
const unsigned char *name);
@@ -229,7 +229,8 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj,
{
}
-static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr)
+static inline void sysfs_notify(struct kobject *kobj, const char *dir,
+ const char *attr)
{
}
static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists