1. 12 10月, 2007 2 次提交
    • J
      backlight: Fix cr_bllcd allocations and error paths · 0b75f2df
      Jesper Juhl 提交于
      After fixing the too small memory allocation in cr_backlight_probe()
      from drivers/video/backlight/cr_bllcd.c
      (commit e3bbb3f0) I noticed that the
      Coverity checker also thought there were a few memory leaks in there.
      I took a closer look and confirmed that there were indeed several
      leaks.
      
      At the start of the function we allocate storage for a
      'struct cr_panel' and store the pointer in a variable named 'crp'.
      
      Then we call pci_get_device() and pci_read_config_byte() and if
      either of them fail we return without freeing the memory allocated
      for the 'struct cr_panel'. These two leaks are easy to fix since we
      don't even use 'crp' for anything up to this point, so I simply
      moved the allocation further down in the function so it only happens
      just before we actually need it.
      
      A bit further down we call backlight_device_register() and store the
      result in 'crp->cr_backlight_device'. In case of error we return
      'crp->cr_backlight_device' from the function, thus leaking 'crp'
      itself. The same thing happens with the call to lcd_device_register().
      To fix these two leaks I declare two new pointers to hold the return
      values, so that in case of error we can return the pointer (as before)
      but without leaking 'crp'.
      
      This version of the patch also adds missing
      backlight_device_unregister() / lcd_device_unregister() / pci_dev_put()
      calls to error paths.
        Thanks to Richard Purdie <rpurdie@rpsys.net> for noticing.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      0b75f2df
    • A
      backlight/leds: Make two structs static · 0ad90efd
      Adrian Bunk 提交于
      This patch makes two needlessly global structs static.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      0ad90efd
  2. 22 7月, 2007 1 次提交
  3. 20 7月, 2007 1 次提交
  4. 16 7月, 2007 2 次提交
  5. 12 7月, 2007 1 次提交
    • 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
  6. 09 5月, 2007 1 次提交
  7. 15 3月, 2007 1 次提交
  8. 08 3月, 2007 1 次提交
  9. 20 2月, 2007 13 次提交
  10. 02 1月, 2007 1 次提交
  11. 20 12月, 2006 1 次提交
    • Y
      ACPI: video: Add dev argument for backlight_device_register · 519ab5f2
      Yu Luming 提交于
      This patch set adds generic abstract layer support for acpi video driver to
      have generic user interface to control backlight and output switch control by
      leveraging the existing backlight sysfs class driver, and by adding a new
      video output sysfs class driver.
      
      This patch:
      
      Add dev argument for backlight_device_register to link the class device to
      real device object.  The platform specific driver should find a way to get the
      real device object for their video device.
      
      [akpm@osdl.org: build fix]
      [akpm@osdl.org: fix msi-laptop.c]
      Signed-off-by: NLuming Yu <Luming.yu@intel.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      519ab5f2
  12. 09 12月, 2006 3 次提交
  13. 31 10月, 2006 1 次提交
  14. 25 10月, 2006 2 次提交
  15. 28 9月, 2006 1 次提交
  16. 27 9月, 2006 1 次提交
  17. 01 8月, 2006 1 次提交
  18. 01 7月, 2006 1 次提交
  19. 28 6月, 2006 1 次提交
  20. 27 6月, 2006 2 次提交
  21. 16 5月, 2006 1 次提交
  22. 01 4月, 2006 1 次提交