aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-06-19 04:29:13 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-06-23 18:00:05 -0400
commit9bf39ab2adafd7cf8740859cb49e7b7952813a5d (patch)
tree2dc4ff57033635f0900328c99020af7bf71a31d2 /drivers/usb
parent4bacc9c9234c7c8eec44f5ed4e960d9f96fa0f01 (diff)
vfs: add file_path() helper
Turn d_path(&file->f_path, ...); into file_path(file, ...); Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/function/f_mass_storage.c2
-rw-r--r--drivers/usb/gadget/function/storage_common.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 3cc109f3c9c8..d2259c663996 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -2936,7 +2936,7 @@ int fsg_common_create_lun(struct fsg_common *common, struct fsg_lun_config *cfg,
2936 if (fsg_lun_is_open(lun)) { 2936 if (fsg_lun_is_open(lun)) {
2937 p = "(error)"; 2937 p = "(error)";
2938 if (pathbuf) { 2938 if (pathbuf) {
2939 p = d_path(&lun->filp->f_path, pathbuf, PATH_MAX); 2939 p = file_path(lun->filp, pathbuf, PATH_MAX);
2940 if (IS_ERR(p)) 2940 if (IS_ERR(p))
2941 p = "(error)"; 2941 p = "(error)";
2942 } 2942 }
diff --git a/drivers/usb/gadget/function/storage_common.c b/drivers/usb/gadget/function/storage_common.c
index 648f9e489b39..d62683017cf3 100644
--- a/drivers/usb/gadget/function/storage_common.c
+++ b/drivers/usb/gadget/function/storage_common.c
@@ -341,7 +341,7 @@ ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem,
341 341
342 down_read(filesem); 342 down_read(filesem);
343 if (fsg_lun_is_open(curlun)) { /* Get the complete pathname */ 343 if (fsg_lun_is_open(curlun)) { /* Get the complete pathname */
344 p = d_path(&curlun->filp->f_path, buf, PAGE_SIZE - 1); 344 p = file_path(curlun->filp, buf, PAGE_SIZE - 1);
345 if (IS_ERR(p)) 345 if (IS_ERR(p))
346 rc = PTR_ERR(p); 346 rc = PTR_ERR(p);
347 else { 347 else {