1. 13 11月, 2008 1 次提交
  2. 20 10月, 2008 1 次提交
    • P
      x86: sysfs: kill owner field from attribute · 01e8ef11
      Parag Warudkar 提交于
      Tejun's commit 7b595756 made sysfs
      attribute->owner unnecessary.  But the field was left in the structure to
      ease the merge.  It's been over a year since that change and it is now
      time to start killing attribute->owner along with its users - one arch at
      a time!
      
      This patch is attempt #1 to get rid of attribute->owner only for
      CONFIG_X86_64 or CONFIG_X86_32 .  We will deal with other arches later on
      as and when possible - avr32 will be the next since that is something I
      can test.  Compile (make allyesconfig / make allmodconfig / custom config)
      and boot tested.
      
      akpm: the idea is that we put the declaration of sttribute.owner inside
      `#ifndef CONFIG_X86'.  But that proved to be too ambitious for now because
      new usages kept on turning up in subsystem trees.
      
      [akpm: remove the ifdef for now]
      Signed-off-by: NParag Warudkar <parag.lkml@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      01e8ef11
  3. 17 10月, 2008 4 次提交
  4. 07 2月, 2008 1 次提交
    • D
      W1: w1_therm.c standardize units to millidegrees C · 7129b126
      David Fries 提交于
      Standardize the temperature units to millidegrees C for the two sensor
      conversion routines.  Previously the routines were,
      
      w1_DS18B20_convert_temp degrees C
      w1_DS18S20_convert_temp millidegrees C
      
      Unfortunately this will break any program using the ds18b20 value as it
      will now be 1000 times bigger.  Fortunately there can't be that many users
      out there, or some of these bugs will have been fixed by now, such as the
      negative C error (see previous patch) that makes me think the ds18b20 is
      the better choice to change because of the current bugs.
      Signed-off-by: NDavid Fries <david@fries.net>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7129b126
  5. 23 1月, 2008 2 次提交
    • D
      W1: w1_therm.c is flagging 0C etc as invalid · 80c002dd
      David Fries 提交于
      The extra rom[0] check is flagging valid temperatures as invalid when
      there is already a CRC data transmission check.
      
      w1_therm_read_bin()
      	if (rom[8] == crc && rom[0])
      		verdict = 1;
      
      Requiring rom[0] to be non-zero will flag as invalid temperature
      conversions when the low byte is zero, specifically the temperatures 0C,
      16C, 32C, 48C, -16C, -32C, and -48C.
      
      The CRC check is produced on the device for the previous 8 bytes and is
      required to ensure the data integrity in transmission.  I don't see why the
      extra check for rom[0] being non-zero is in there.  Evgeniy Polyakov didn't
      know either.  Just for a check I unplugged the sensor, executed a
      temperature conversion, and read the results.  The read was all ff's, which
      also failed the CRC, so it doesn't need to protect against a disconnected
      sensor.
      
      I have more extensive patches in the work, but these two trivial ones will
      do for today.  I would like to hear from people who use the ds2490 USB to
      one wire dongle.  1 if you would be willing to test the patches as I
      currently only have the one sensor on a short parisite powered wire, 2 if
      there is any cheap sources for the ds2490.
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80c002dd
    • D
      W1: w1_therm.c ds18b20 decode freezing temperatures correctly · 941ed3b5
      David Fries 提交于
      Correct the decoding of negative C temperatures.  The code did a binary OR
      of two bytes to make a 16 bit value, but assignd it to an integer.  This
      caused the value to not be sign extended and to loose that it was a
      negative number in the assignment.
      
      Before the patch (in my freezer),
      	w1_slave
      	ed fe 4b 46 7f ff 03 10 e4 : crc=e4 YES
      	ed fe 4b 46 7f ff 03 10 e4 t=4078
      With the patch,
      	e3 fe 4b 46 7f ff 0d 10 81 : crc=81 YES
      	e3 fe 4b 46 7f ff 0d 10 81 t=-17
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      941ed3b5
  6. 20 7月, 2007 1 次提交
  7. 17 7月, 2007 1 次提交
  8. 16 7月, 2007 3 次提交
  9. 12 7月, 2007 2 次提交
    • Z
      sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes · 91a69029
      Zhang Rui 提交于
      Well, first of all, I don't want to change so many files either.
      
      What I do:
      Adding a new parameter "struct bin_attribute *" in the
      .read/.write methods for the sysfs binary attributes.
      
      In fact, only the four lines change in fs/sysfs/bin.c and
      include/linux/sysfs.h do the real work.
      But I have to update all the files that use binary attributes
      to make them compatible with the new .read and .write methods.
      I'm not sure if I missed any. :(
      
      Why I do this:
      For a sysfs attribute, we can get a pointer pointing to the
      struct attribute in the .show/.store method,
      while we can't do this for the binary attributes.
      I don't know why this is different, but this does make it not
      so handy to use the binary attributes as the regular ones.
      So I think this patch is reasonable. :)
      
      Who benefits from it:
      The patch that exposes ACPI tables in sysfs
      requires such an improvement.
      All the table binary attributes share the same .read method.
      Parameter "struct bin_attribute *" is used to get
      the table signature and instance number which are used to
      distinguish different ACPI table binary attributes.
      
      Without this parameter, we need to offer different .read methods
      for different ACPI table binary attributes.
      This is impossible as there are various ACPI tables on different
      platforms, and we don't know what they are until they are loaded.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      91a69029
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  10. 10 7月, 2007 1 次提交
  11. 29 6月, 2007 1 次提交
  12. 13 2月, 2007 1 次提交
  13. 14 12月, 2006 1 次提交
  14. 08 12月, 2006 1 次提交
  15. 04 12月, 2006 1 次提交
  16. 23 6月, 2006 3 次提交
  17. 24 3月, 2006 1 次提交