1. 16 1月, 2010 1 次提交
  2. 16 12月, 2009 1 次提交
  3. 30 8月, 2009 1 次提交
    • H
      ACPI battery: work around negative s16 battery current on Acer · bc76f90b
      Hector Martin 提交于
      Acer Aspire 8930G laptops (and possibly others) report the battery current
      as a 16-bit signed negative when it is charging.  It also reports it as
      0x10000 when the current is 0.  This patch adds a quirk for this which
      takes the absolute value of the reported current cast to an s16.  This is
      a DSDT bug present in the latest BIOS revision (the EC register is 16 bits
      signed and the DSDT attempts to take the 16-bit two's complement of this,
      which works for discharge but not charge.  It also breaks zero values
      because a 32-bit register is used and the high bits aren't thrown away).
      
      I've enabled this for all Acer systems which report in mA units.  This
      should be safe since it won't break compliant systems unless they report a
      current above 32A, which is insane.  The patch also detects the valid
      32-bit value -1, which indicates unknown status, and does not attempt the
      fix in that case (note that this does not conflict with 16-bit -1, which
      is 65535 as read normally and gets translated to 1mA).
      Signed-off-by: NHector Martin <hector@marcansoft.com>
      Acked-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      bc76f90b
  4. 29 8月, 2009 1 次提交
  5. 18 6月, 2009 2 次提交
  6. 12 4月, 2009 1 次提交
  7. 08 4月, 2009 1 次提交
  8. 05 4月, 2009 1 次提交
    • A
      ACPI: battery: asynchronous init · 0f66af53
      Arjan van de Ven 提交于
      The battery driver tends to take quite some time to initialize
      (100ms-300ms is quite typical).
      This patch initializes the batter driver asynchronously, so that other
      things in the kernel can initialize in parallel to this 300 msec.
      
      As part of this, the battery driver had to move to the back
      of the ACPI init order (hence the Makefile change).
      Without this move, the next ACPI driver would just block
      on the ACPI/devicee layer semaphores until the battery driver was
      done anyway, not gaining any boot time.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0f66af53
  9. 04 4月, 2009 1 次提交
  10. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  11. 28 3月, 2009 1 次提交
  12. 22 2月, 2009 1 次提交
  13. 23 12月, 2008 1 次提交
  14. 06 12月, 2008 1 次提交
  15. 05 12月, 2008 1 次提交
  16. 27 11月, 2008 1 次提交
  17. 08 11月, 2008 1 次提交
  18. 07 11月, 2008 1 次提交
    • K
      ACPI: struct device - replace bus_id with dev_name(), dev_set_name() · 0794469d
      Kay Sievers 提交于
      This patch is part of a larger patch series which will remove
      the "char bus_id[20]" name string from struct device. The device
      name is managed in the kobject anyway, and without any size
      limitation, and just needlessly copied into "struct device".
      
      To set and read the device name dev_name(dev) and dev_set_name(dev)
      must be used. If your code uses static kobjects, which it shouldn't
      do, "const char *init_name" can be used to statically provide the
      name the registered device should have. At registration time, the
      init_name field is cleared, to enforce the use of dev_name(dev) to
      access the device name at a later time.
      
      We need to get rid of all occurrences of bus_id in the entire tree
      to be able to enable the new interface. Please apply this patch,
      and possibly convert any remaining remaining occurrences of bus_id.
      
      We want to submit a patch to -next, which will remove bus_id from
      "struct device", to find the remaining pieces to convert, and finally
      switch over to the new api, which will remove the 20 bytes array
      and does no longer have a size limitation.
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-Off-By: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0794469d
  19. 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
  20. 11 10月, 2008 1 次提交
  21. 29 4月, 2008 1 次提交
  22. 18 3月, 2008 1 次提交
  23. 06 2月, 2008 1 次提交
  24. 02 1月, 2008 1 次提交
  25. 07 12月, 2007 1 次提交
  26. 20 11月, 2007 1 次提交
  27. 14 11月, 2007 1 次提交
  28. 09 11月, 2007 1 次提交
    • R
      ACPI: Always return valid 'status' from acpi_battery_get_property() · 4c41d3ad
      Roland Dreier 提交于
      If a battery is at a critical charge level and not being charged or
      discharged, then the ACPI _BST method will return a state of 4, and
      the current acpi_battery_get_property() code will not set any property
      value for POWER_SUPPLY_PROP_STATUS.  This will cause an oops in
      power_supply_show_property() when it reads off the end of the
      status_text array.  This actually was causing a 100% reproducible
      crash on boot on my laptop with two batteries, when one battery was
      completely drained and the laptop was not plugged in.
      
      Fix this by making sure acpi_battery_get_property() returns
      POWER_SUPPLY_STATUS_UNKNOWN for any battery state it doesn't already
      handle explicitly.  There doesn't seem to be any status enum value
      defined that makes more sense than 'unknown' for a battery at a
      critical charge level.
      Signed-off-by: NRoland Dreier <roland@digitalvampire.org>
      Acked-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
      Signed-off-by: NLen Brown <lenb@t61.(none)>
      4c41d3ad
  29. 30 10月, 2007 3 次提交
  30. 26 10月, 2007 2 次提交
  31. 28 9月, 2007 5 次提交
  32. 24 8月, 2007 1 次提交
    • L
      ACPI: Schedule /proc/acpi/event for removal · 14e04fb3
      Len Brown 提交于
      Schedule /proc/acpi/event for removal in 6 months.
      
      Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event()
      to make sure there is no confusion that it is for /proc/acpi/event only.
      
      Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event.
      There is no functional change if CONFIG_ACPI_PROC_EVENT=y
      Signed-off-by: NLen Brown <len.brown@intel.com>
      14e04fb3