[03/07] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
dmitry.torokhov at gmail.com
Wed Apr 27 21:49:38 CEST 2005
On 4/27/05, Dmitry Torokhov <dmitry.torokhov at gmail.com> wrote:
> On 4/27/05, Greg KH <gregkh at suse.de> wrote:
> > -stable review patch. If anyone has any objections, please let us know.
> While the patch is correct I'd have something like this as well:
> --- linux-2.6.11.orig/fs/sysfs/file.c
> +++ linux-2.6.11/fs/sysfs/file.c
> @@ -36,7 +36,7 @@ subsys_attr_store(struct kobject * kobj,
> struct subsystem * s = to_subsys(kobj);
> struct subsys_attribute * sattr = to_sattr(attr);
> - ssize_t ret = 0;
> + ssize_t ret = -ENOSYS;
> if (sattr->store)
> ret = sattr->store(s,page,count);
> So writes without store handler would return "not implemented".
Obviously driver_sysfs_ops, bus_sysfs_ops, etc need the same treatment...
More information about the lm-sensors