aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJosef Sipek <jsipek@fsl.cs.sunysb.edu>2006-12-08 05:37:46 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:50 -0500
commit33cb89940082c54f348062db2f8bab6cf8fed816 (patch)
treebf9fcca689b9843108177623e723f526c86a0d9e /drivers
parent592ccbf9fba665031765d9bb0f6c1ede1fa62f96 (diff)
[PATCH] struct path: convert usb
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/inode.c4
-rw-r--r--drivers/usb/gadget/file_storage.c16
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index b5d6a79af0be..11dad22da41c 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -379,7 +379,7 @@ static loff_t default_file_lseek (struct file *file, loff_t offset, int orig)
379{ 379{
380 loff_t retval = -EINVAL; 380 loff_t retval = -EINVAL;
381 381
382 mutex_lock(&file->f_dentry->d_inode->i_mutex); 382 mutex_lock(&file->f_path.dentry->d_inode->i_mutex);
383 switch(orig) { 383 switch(orig) {
384 case 0: 384 case 0:
385 if (offset > 0) { 385 if (offset > 0) {
@@ -396,7 +396,7 @@ static loff_t default_file_lseek (struct file *file, loff_t offset, int orig)
396 default: 396 default:
397 break; 397 break;
398 } 398 }
399 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 399 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
400 return retval; 400 return retval;
401} 401}
402 402
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index c98316ce8384..a265e262a2ee 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -1909,10 +1909,10 @@ static int fsync_sub(struct lun *curlun)
1909 if (!filp->f_op->fsync) 1909 if (!filp->f_op->fsync)
1910 return -EINVAL; 1910 return -EINVAL;
1911 1911
1912 inode = filp->f_dentry->d_inode; 1912 inode = filp->f_path.dentry->d_inode;
1913 mutex_lock(&inode->i_mutex); 1913 mutex_lock(&inode->i_mutex);
1914 rc = filemap_fdatawrite(inode->i_mapping); 1914 rc = filemap_fdatawrite(inode->i_mapping);
1915 err = filp->f_op->fsync(filp, filp->f_dentry, 1); 1915 err = filp->f_op->fsync(filp, filp->f_path.dentry, 1);
1916 if (!rc) 1916 if (!rc)
1917 rc = err; 1917 rc = err;
1918 err = filemap_fdatawait(inode->i_mapping); 1918 err = filemap_fdatawait(inode->i_mapping);
@@ -1950,7 +1950,7 @@ static int do_synchronize_cache(struct fsg_dev *fsg)
1950static void invalidate_sub(struct lun *curlun) 1950static void invalidate_sub(struct lun *curlun)
1951{ 1951{
1952 struct file *filp = curlun->filp; 1952 struct file *filp = curlun->filp;
1953 struct inode *inode = filp->f_dentry->d_inode; 1953 struct inode *inode = filp->f_path.dentry->d_inode;
1954 unsigned long rc; 1954 unsigned long rc;
1955 1955
1956 rc = invalidate_inode_pages(inode->i_mapping); 1956 rc = invalidate_inode_pages(inode->i_mapping);
@@ -3526,8 +3526,8 @@ static int open_backing_file(struct lun *curlun, const char *filename)
3526 if (!(filp->f_mode & FMODE_WRITE)) 3526 if (!(filp->f_mode & FMODE_WRITE))
3527 ro = 1; 3527 ro = 1;
3528 3528
3529 if (filp->f_dentry) 3529 if (filp->f_path.dentry)
3530 inode = filp->f_dentry->d_inode; 3530 inode = filp->f_path.dentry->d_inode;
3531 if (inode && S_ISBLK(inode->i_mode)) { 3531 if (inode && S_ISBLK(inode->i_mode)) {
3532 if (bdev_read_only(inode->i_bdev)) 3532 if (bdev_read_only(inode->i_bdev))
3533 ro = 1; 3533 ro = 1;
@@ -3606,7 +3606,7 @@ static ssize_t show_file(struct device *dev, struct device_attribute *attr, char
3606 3606
3607 down_read(&fsg->filesem); 3607 down_read(&fsg->filesem);
3608 if (backing_file_is_open(curlun)) { // Get the complete pathname 3608 if (backing_file_is_open(curlun)) { // Get the complete pathname
3609 p = d_path(curlun->filp->f_dentry, curlun->filp->f_vfsmnt, 3609 p = d_path(curlun->filp->f_path.dentry, curlun->filp->f_path.mnt,
3610 buf, PAGE_SIZE - 1); 3610 buf, PAGE_SIZE - 1);
3611 if (IS_ERR(p)) 3611 if (IS_ERR(p))
3612 rc = PTR_ERR(p); 3612 rc = PTR_ERR(p);
@@ -4030,8 +4030,8 @@ static int __init fsg_bind(struct usb_gadget *gadget)
4030 if (backing_file_is_open(curlun)) { 4030 if (backing_file_is_open(curlun)) {
4031 p = NULL; 4031 p = NULL;
4032 if (pathbuf) { 4032 if (pathbuf) {
4033 p = d_path(curlun->filp->f_dentry, 4033 p = d_path(curlun->filp->f_path.dentry,
4034 curlun->filp->f_vfsmnt, 4034 curlun->filp->f_path.mnt,
4035 pathbuf, PATH_MAX); 4035 pathbuf, PATH_MAX);
4036 if (IS_ERR(p)) 4036 if (IS_ERR(p))
4037 p = NULL; 4037 p = NULL;
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index b99ca9c79821..0398908b15d4 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -3168,7 +3168,7 @@ sisusb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3168 case SISUSB_GET_CONFIG: 3168 case SISUSB_GET_CONFIG:
3169 case SISUSB_COMMAND: 3169 case SISUSB_COMMAND:
3170 lock_kernel(); 3170 lock_kernel();
3171 retval = sisusb_ioctl(f->f_dentry->d_inode, f, cmd, arg); 3171 retval = sisusb_ioctl(f->f_path.dentry->d_inode, f, cmd, arg);
3172 unlock_kernel(); 3172 unlock_kernel();
3173 return retval; 3173 return retval;
3174 3174