aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 23:16:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 23:16:07 -0500
commitd895cb1af15c04c522a25c79cc429076987c089b (patch)
tree895dc9157e28f603d937a58be664e4e440d5530c /drivers/media
parent9626357371b519f2b955fef399647181034a77fe (diff)
parentd3d009cb965eae7e002ea5badf603ea8f4c34915 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile (part one) from Al Viro: "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent locking violations, etc. The most visible changes here are death of FS_REVAL_DOT (replaced with "has ->d_weak_revalidate()") and a new helper getting from struct file to inode. Some bits of preparation to xattr method interface changes. Misc patches by various people sent this cycle *and* ocfs2 fixes from several cycles ago that should've been upstream right then. PS: the next vfs pile will be xattr stuff." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) saner proc_get_inode() calling conventions proc: avoid extra pde_put() in proc_fill_super() fs: change return values from -EACCES to -EPERM fs/exec.c: make bprm_mm_init() static ocfs2/dlm: use GFP_ATOMIC inside a spin_lock ocfs2: fix possible use-after-free with AIO ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero target: writev() on single-element vector is pointless export kernel_write(), convert open-coded instances fs: encode_fh: return FILEID_INVALID if invalid fid_type kill f_vfsmnt vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op nfsd: handle vfs_getattr errors in acl protocol switch vfs_getattr() to struct path default SET_PERSONALITY() in linux/elf.h ceph: prepopulate inodes only when request is aborted d_hash_and_lookup(): export, switch open-coded instances 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 9p: split dropping the acls from v9fs_set_create_acl() ...
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/zoran/zoran_procfs.c2
-rw-r--r--drivers/media/rc/lirc_dev.c19
-rw-r--r--drivers/media/v4l2-core/v4l2-dev.c2
3 files changed, 7 insertions, 16 deletions
diff --git a/drivers/media/pci/zoran/zoran_procfs.c b/drivers/media/pci/zoran/zoran_procfs.c
index f1423b777db1..e084b0a21b1b 100644
--- a/drivers/media/pci/zoran/zoran_procfs.c
+++ b/drivers/media/pci/zoran/zoran_procfs.c
@@ -137,7 +137,7 @@ static int zoran_open(struct inode *inode, struct file *file)
137static ssize_t zoran_write(struct file *file, const char __user *buffer, 137static ssize_t zoran_write(struct file *file, const char __user *buffer,
138 size_t count, loff_t *ppos) 138 size_t count, loff_t *ppos)
139{ 139{
140 struct zoran *zr = PDE(file->f_path.dentry->d_inode)->data; 140 struct zoran *zr = PDE(file_inode(file))->data;
141 char *string, *sp; 141 char *string, *sp;
142 char *line, *ldelim, *varname, *svar, *tdelim; 142 char *line, *ldelim, *varname, *svar, *tdelim;
143 143
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index ca12d3289bfe..5247d94fea29 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -531,7 +531,7 @@ EXPORT_SYMBOL(lirc_dev_fop_close);
531 531
532unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) 532unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
533{ 533{
534 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 534 struct irctl *ir = irctls[iminor(file_inode(file))];
535 unsigned int ret; 535 unsigned int ret;
536 536
537 if (!ir) { 537 if (!ir) {
@@ -565,7 +565,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
565{ 565{
566 __u32 mode; 566 __u32 mode;
567 int result = 0; 567 int result = 0;
568 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 568 struct irctl *ir = irctls[iminor(file_inode(file))];
569 569
570 if (!ir) { 570 if (!ir) {
571 printk(KERN_ERR "lirc_dev: %s: no irctl found!\n", __func__); 571 printk(KERN_ERR "lirc_dev: %s: no irctl found!\n", __func__);
@@ -650,7 +650,7 @@ ssize_t lirc_dev_fop_read(struct file *file,
650 size_t length, 650 size_t length,
651 loff_t *ppos) 651 loff_t *ppos)
652{ 652{
653 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 653 struct irctl *ir = irctls[iminor(file_inode(file))];
654 unsigned char *buf; 654 unsigned char *buf;
655 int ret = 0, written = 0; 655 int ret = 0, written = 0;
656 DECLARE_WAITQUEUE(wait, current); 656 DECLARE_WAITQUEUE(wait, current);
@@ -752,16 +752,7 @@ EXPORT_SYMBOL(lirc_dev_fop_read);
752 752
753void *lirc_get_pdata(struct file *file) 753void *lirc_get_pdata(struct file *file)
754{ 754{
755 void *data = NULL; 755 return irctls[iminor(file_inode(file))]->d.data;
756
757 if (file && file->f_dentry && file->f_dentry->d_inode &&
758 file->f_dentry->d_inode->i_rdev) {
759 struct irctl *ir;
760 ir = irctls[iminor(file->f_dentry->d_inode)];
761 data = ir->d.data;
762 }
763
764 return data;
765} 756}
766EXPORT_SYMBOL(lirc_get_pdata); 757EXPORT_SYMBOL(lirc_get_pdata);
767 758
@@ -769,7 +760,7 @@ EXPORT_SYMBOL(lirc_get_pdata);
769ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer, 760ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer,
770 size_t length, loff_t *ppos) 761 size_t length, loff_t *ppos)
771{ 762{
772 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 763 struct irctl *ir = irctls[iminor(file_inode(file))];
773 764
774 if (!ir) { 765 if (!ir) {
775 printk(KERN_ERR "%s: called with invalid irctl\n", __func__); 766 printk(KERN_ERR "%s: called with invalid irctl\n", __func__);
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 51b3a7713dcd..de1e9ab7db99 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -222,7 +222,7 @@ static struct class video_class = {
222 222
223struct video_device *video_devdata(struct file *file) 223struct video_device *video_devdata(struct file *file)
224{ 224{
225 return video_device[iminor(file->f_path.dentry->d_inode)]; 225 return video_device[iminor(file_inode(file))];
226} 226}
227EXPORT_SYMBOL(video_devdata); 227EXPORT_SYMBOL(video_devdata);
228 228