Skip to content
Snippets Groups Projects
  1. Dec 24, 2010
  2. Jun 03, 2010
  3. May 21, 2010
    • Jean Delvare's avatar
      at24: Fall back to byte or word reads if needed · 7aeb9664
      Jean Delvare authored
      
      Increase the portability of the at24 driver by letting it read from
      EEPROM chips connected to cheap SMBus controllers that support neither
      raw I2C messages nor even I2C block reads. All SMBus controllers
      should support either word reads or byte reads, so read support
      becomes universal, much like with the legacy "eeprom" driver.
      
      Obviously, this only works with EEPROM chips up to AT24C16, that use
      8-bit offset addressing. 16-bit offset addressing is almost impossible
      to support on SMBus controllers.
      
      I did not add universal support for writes, as I had no immediate need
      for this, but it could be added later if needed (with the same
      performance issue as byte and word reads have, of course.)
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Reviewed-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Cc: Konstantin Lazarev <klazarev@sbcglobal.net>
      7aeb9664
    • Chris Wright's avatar
      sysfs: add struct file* to bin_attr callbacks · 2c3c8bea
      Chris Wright authored
      
      This allows bin_attr->read,write,mmap callbacks to check file specific data
      (such as inode owner) as part of any privilege validation.
      
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2c3c8bea
  4. May 14, 2010
  5. Mar 14, 2010
    • Wolfram Sang's avatar
      init dynamic bin_attribute structures · f937331b
      Wolfram Sang authored
      
      Commit 6992f533 ("sysfs: Use one lockdep
      class per sysfs attribute.") introduced this requirement.  First, at25
      was fixed manually.  Then, other occurences were found with coccinelle
      and the following semantic patch.  Results were reviewed and fixed up:
      
          @ init @
          identifier struct_name, bin;
          @@
      
          	struct struct_name {
          		...
          		struct bin_attribute bin;
          		...
          	};
      
          @ main extends init @
          expression E;
          statement S;
          identifier name, err;
          @@
      
          (
          	struct struct_name *name;
          |
          -	struct struct_name *name = NULL;
          +	struct struct_name *name;
          )
          	...
          (
          	sysfs_bin_attr_init(&name->bin);
          |
          +	sysfs_bin_attr_init(&name->bin);
          	if (sysfs_create_bin_file(E, &name->bin))
          		S
          |
          +	sysfs_bin_attr_init(&name->bin);
          	err = sysfs_create_bin_file(E, &name->bin);
          )
      
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f937331b
  6. Mar 13, 2010
  7. Dec 14, 2009
  8. Nov 26, 2009
  9. Oct 04, 2009
  10. Sep 23, 2009
  11. Jul 29, 2009
  12. Jun 15, 2009
  13. Apr 13, 2009
  14. Apr 02, 2009
  15. Mar 28, 2009
  16. Jan 26, 2009
Loading