Commit 711aab1d authored by Mimi Zohar's avatar Mimi Zohar Committed by Linus Torvalds

vfs: constify path argument to kernel_read_file_from_path

This patch constifies the path argument to kernel_read_file_from_path().
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6ed0529f
...@@ -955,7 +955,7 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size, ...@@ -955,7 +955,7 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size,
} }
EXPORT_SYMBOL_GPL(kernel_read_file); EXPORT_SYMBOL_GPL(kernel_read_file);
int kernel_read_file_from_path(char *path, void **buf, loff_t *size, int kernel_read_file_from_path(const char *path, void **buf, loff_t *size,
loff_t max_size, enum kernel_read_file_id id) loff_t max_size, enum kernel_read_file_id id)
{ {
struct file *file; struct file *file;
......
...@@ -2815,7 +2815,7 @@ static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) ...@@ -2815,7 +2815,7 @@ static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id)
extern int kernel_read_file(struct file *, void **, loff_t *, loff_t, extern int kernel_read_file(struct file *, void **, loff_t *, loff_t,
enum kernel_read_file_id); enum kernel_read_file_id);
extern int kernel_read_file_from_path(char *, void **, loff_t *, loff_t, extern int kernel_read_file_from_path(const char *, void **, loff_t *, loff_t,
enum kernel_read_file_id); enum kernel_read_file_id);
extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t, extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t,
enum kernel_read_file_id); enum kernel_read_file_id);
......
...@@ -21,7 +21,7 @@ static inline int mod_firmware_load(const char *fn, char **fp) ...@@ -21,7 +21,7 @@ static inline int mod_firmware_load(const char *fn, char **fp)
loff_t size; loff_t size;
int err; int err;
err = kernel_read_file_from_path((char *)fn, (void **)fp, &size, err = kernel_read_file_from_path(fn, (void **)fp, &size,
131072, READING_FIRMWARE); 131072, READING_FIRMWARE);
if (err < 0) if (err < 0)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment