diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 55 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 3 | ||||
-rw-r--r-- | drivers/isdn/capi/capifs.c | 2 | ||||
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 2 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_config.c | 2 | ||||
-rw-r--r-- | drivers/message/i2o/iop.c | 2 | ||||
-rw-r--r-- | drivers/message/i2o/pci.c | 2 | ||||
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 2 | ||||
-rw-r--r-- | drivers/oprofile/oprofilefs.c | 3 | ||||
-rw-r--r-- | drivers/usb/core/inode.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 18 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 1 |
12 files changed, 40 insertions, 53 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 31d6f535a79d..01dde80597f7 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -754,6 +754,11 @@ static struct kobj_type ktype_cpufreq = { | |||
754 | .release = cpufreq_sysfs_release, | 754 | .release = cpufreq_sysfs_release, |
755 | }; | 755 | }; |
756 | 756 | ||
757 | static struct kobj_type ktype_empty_cpufreq = { | ||
758 | .sysfs_ops = &sysfs_ops, | ||
759 | .release = cpufreq_sysfs_release, | ||
760 | }; | ||
761 | |||
757 | 762 | ||
758 | /** | 763 | /** |
759 | * cpufreq_add_dev - add a CPU device | 764 | * cpufreq_add_dev - add a CPU device |
@@ -822,8 +827,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
822 | dprintk("initialization failed\n"); | 827 | dprintk("initialization failed\n"); |
823 | goto err_out; | 828 | goto err_out; |
824 | } | 829 | } |
825 | policy->user_policy.min = policy->cpuinfo.min_freq; | 830 | policy->user_policy.min = policy->min; |
826 | policy->user_policy.max = policy->cpuinfo.max_freq; | 831 | policy->user_policy.max = policy->max; |
827 | 832 | ||
828 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, | 833 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, |
829 | CPUFREQ_START, policy); | 834 | CPUFREQ_START, policy); |
@@ -876,26 +881,36 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
876 | memcpy(&new_policy, policy, sizeof(struct cpufreq_policy)); | 881 | memcpy(&new_policy, policy, sizeof(struct cpufreq_policy)); |
877 | 882 | ||
878 | /* prepare interface data */ | 883 | /* prepare interface data */ |
879 | ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, &sys_dev->kobj, | 884 | if (!cpufreq_driver->hide_interface) { |
880 | "cpufreq"); | 885 | ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, |
881 | if (ret) | 886 | &sys_dev->kobj, "cpufreq"); |
882 | goto err_out_driver_exit; | ||
883 | |||
884 | /* set up files for this cpu device */ | ||
885 | drv_attr = cpufreq_driver->attr; | ||
886 | while ((drv_attr) && (*drv_attr)) { | ||
887 | ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)); | ||
888 | if (ret) | 887 | if (ret) |
889 | goto err_out_driver_exit; | 888 | goto err_out_driver_exit; |
890 | drv_attr++; | 889 | |
891 | } | 890 | /* set up files for this cpu device */ |
892 | if (cpufreq_driver->get) { | 891 | drv_attr = cpufreq_driver->attr; |
893 | ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); | 892 | while ((drv_attr) && (*drv_attr)) { |
894 | if (ret) | 893 | ret = sysfs_create_file(&policy->kobj, |
895 | goto err_out_driver_exit; | 894 | &((*drv_attr)->attr)); |
896 | } | 895 | if (ret) |
897 | if (cpufreq_driver->target) { | 896 | goto err_out_driver_exit; |
898 | ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); | 897 | drv_attr++; |
898 | } | ||
899 | if (cpufreq_driver->get) { | ||
900 | ret = sysfs_create_file(&policy->kobj, | ||
901 | &cpuinfo_cur_freq.attr); | ||
902 | if (ret) | ||
903 | goto err_out_driver_exit; | ||
904 | } | ||
905 | if (cpufreq_driver->target) { | ||
906 | ret = sysfs_create_file(&policy->kobj, | ||
907 | &scaling_cur_freq.attr); | ||
908 | if (ret) | ||
909 | goto err_out_driver_exit; | ||
910 | } | ||
911 | } else { | ||
912 | ret = kobject_init_and_add(&policy->kobj, &ktype_empty_cpufreq, | ||
913 | &sys_dev->kobj, "cpufreq"); | ||
899 | if (ret) | 914 | if (ret) |
900 | goto err_out_driver_exit; | 915 | goto err_out_driver_exit; |
901 | } | 916 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 53912c327bfe..8dc2bb781605 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -57,9 +57,6 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, | |||
57 | } | 57 | } |
58 | 58 | ||
59 | inode->i_mode = mode; | 59 | inode->i_mode = mode; |
60 | inode->i_uid = 0; | ||
61 | inode->i_gid = 0; | ||
62 | inode->i_blocks = 0; | ||
63 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 60 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
64 | inode->i_private = data; | 61 | inode->i_private = data; |
65 | if ((mode & S_IFMT) == S_IFDIR) { | 62 | if ((mode & S_IFMT) == S_IFDIR) { |
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 0aa66ec4cbdd..b129409925af 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c | |||
@@ -111,8 +111,6 @@ capifs_fill_super(struct super_block *s, void *data, int silent) | |||
111 | goto fail; | 111 | goto fail; |
112 | inode->i_ino = 1; | 112 | inode->i_ino = 1; |
113 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 113 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
114 | inode->i_blocks = 0; | ||
115 | inode->i_uid = inode->i_gid = 0; | ||
116 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; | 114 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; |
117 | inode->i_op = &simple_dir_inode_operations; | 115 | inode->i_op = &simple_dir_inode_operations; |
118 | inode->i_fop = &simple_dir_operations; | 116 | inode->i_fop = &simple_dir_operations; |
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 56faef1a1d55..06c655c55587 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> | 19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> |
20 | * Deepak Saxena <deepak@plexity.net> | 20 | * Deepak Saxena <deepak@plexity.net> |
21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> | 21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@lxorguk.ukuu.org.uk>: |
23 | * Ported to Linux 2.5. | 23 | * Ported to Linux 2.5. |
24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: | 24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: |
25 | * Minor fixes for 2.6. | 25 | * Minor fixes for 2.6. |
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index f3384c32b9a1..efba7021948a 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel() | 19 | * Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel() |
20 | * Deepak Saxena (11/18/1999): | 20 | * Deepak Saxena (11/18/1999): |
21 | * Added event managmenet support | 21 | * Added event managmenet support |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@lxorguk.ukuu.org.uk>: |
23 | * 2.4 rewrite ported to 2.5 | 23 | * 2.4 rewrite ported to 2.5 |
24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: | 24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: |
25 | * Added pass-thru support for Adaptec's raidutils | 25 | * Added pass-thru support for Adaptec's raidutils |
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c index 6e53a30bfd38..35c67d1f255e 100644 --- a/drivers/message/i2o/iop.c +++ b/drivers/message/i2o/iop.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> | 19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> |
20 | * Deepak Saxena <deepak@plexity.net> | 20 | * Deepak Saxena <deepak@plexity.net> |
21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> | 21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@lxorguk.ukuu.org.uk>: |
23 | * Ported to Linux 2.5. | 23 | * Ported to Linux 2.5. |
24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: | 24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: |
25 | * Minor fixes for 2.6. | 25 | * Minor fixes for 2.6. |
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 610ef1204e68..25d6f2341983 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> | 19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> |
20 | * Deepak Saxena <deepak@plexity.net> | 20 | * Deepak Saxena <deepak@plexity.net> |
21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> | 21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@lxorguk.ukuu.org.uk>: |
23 | * Ported to Linux 2.5. | 23 | * Ported to Linux 2.5. |
24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: | 24 | * Markus Lidel <Markus.Lidel@shadowconnect.com>: |
25 | * Minor fixes for 2.6. | 25 | * Minor fixes for 2.6. |
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index 22a7e8ba211d..de966a6fb7e6 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c | |||
@@ -146,8 +146,6 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode) | |||
146 | 146 | ||
147 | if (ret) { | 147 | if (ret) { |
148 | ret->i_mode = mode; | 148 | ret->i_mode = mode; |
149 | ret->i_uid = ret->i_gid = 0; | ||
150 | ret->i_blocks = 0; | ||
151 | ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; | 149 | ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; |
152 | } | 150 | } |
153 | return ret; | 151 | return ret; |
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index ddc4c59f02dc..b7e4cee24269 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c | |||
@@ -29,9 +29,6 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode) | |||
29 | 29 | ||
30 | if (inode) { | 30 | if (inode) { |
31 | inode->i_mode = mode; | 31 | inode->i_mode = mode; |
32 | inode->i_uid = 0; | ||
33 | inode->i_gid = 0; | ||
34 | inode->i_blocks = 0; | ||
35 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 32 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
36 | } | 33 | } |
37 | return inode; | 34 | return inode; |
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index 185be760833e..2a129cb7bb56 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -279,7 +279,6 @@ static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t de | |||
279 | inode->i_mode = mode; | 279 | inode->i_mode = mode; |
280 | inode->i_uid = current_fsuid(); | 280 | inode->i_uid = current_fsuid(); |
281 | inode->i_gid = current_fsgid(); | 281 | inode->i_gid = current_fsgid(); |
282 | inode->i_blocks = 0; | ||
283 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 282 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
284 | switch (mode & S_IFMT) { | 283 | switch (mode & S_IFMT) { |
285 | default: | 284 | default: |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index c4e62a6297d7..2e71368f45b4 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -1863,26 +1863,10 @@ static int do_write(struct fsg_dev *fsg) | |||
1863 | static int fsync_sub(struct lun *curlun) | 1863 | static int fsync_sub(struct lun *curlun) |
1864 | { | 1864 | { |
1865 | struct file *filp = curlun->filp; | 1865 | struct file *filp = curlun->filp; |
1866 | struct inode *inode; | ||
1867 | int rc, err; | ||
1868 | 1866 | ||
1869 | if (curlun->ro || !filp) | 1867 | if (curlun->ro || !filp) |
1870 | return 0; | 1868 | return 0; |
1871 | if (!filp->f_op->fsync) | 1869 | return vfs_fsync(filp, filp->f_path.dentry, 1); |
1872 | return -EINVAL; | ||
1873 | |||
1874 | inode = filp->f_path.dentry->d_inode; | ||
1875 | mutex_lock(&inode->i_mutex); | ||
1876 | rc = filemap_fdatawrite(inode->i_mapping); | ||
1877 | err = filp->f_op->fsync(filp, filp->f_path.dentry, 1); | ||
1878 | if (!rc) | ||
1879 | rc = err; | ||
1880 | err = filemap_fdatawait(inode->i_mapping); | ||
1881 | if (!rc) | ||
1882 | rc = err; | ||
1883 | mutex_unlock(&inode->i_mutex); | ||
1884 | VLDBG(curlun, "fdatasync -> %d\n", rc); | ||
1885 | return rc; | ||
1886 | } | 1870 | } |
1887 | 1871 | ||
1888 | static void fsync_all(struct fsg_dev *fsg) | 1872 | static void fsync_all(struct fsg_dev *fsg) |
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index eeb26c0f88e5..317b48fdbf01 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -2001,7 +2001,6 @@ gadgetfs_make_inode (struct super_block *sb, | |||
2001 | inode->i_mode = mode; | 2001 | inode->i_mode = mode; |
2002 | inode->i_uid = default_uid; | 2002 | inode->i_uid = default_uid; |
2003 | inode->i_gid = default_gid; | 2003 | inode->i_gid = default_gid; |
2004 | inode->i_blocks = 0; | ||
2005 | inode->i_atime = inode->i_mtime = inode->i_ctime | 2004 | inode->i_atime = inode->i_mtime = inode->i_ctime |
2006 | = CURRENT_TIME; | 2005 | = CURRENT_TIME; |
2007 | inode->i_private = data; | 2006 | inode->i_private = data; |