1. 26 4月, 2019 2 次提交
  2. 02 3月, 2019 1 次提交
  3. 26 2月, 2019 1 次提交
    • M
      platform: set of_node in platform_device_register_full() · 2c1ea6ab
      Mans Rullgard 提交于
      If the provided fwnode is an OF node, set dev.of_node as well.
      
      Also add an of_node_reused flag to struct platform_device_info and copy
      this to the new device.  This is needed to avoid pinctrl settings being
      requested twice.  See 4e75e1d7 ("driver core: add helper to reuse a
      device-tree node") for a longer explanation.
      
      Some drivers are just shims that create extra "glue" devices with the
      DT device as parent and have the real driver bind to these.  In these
      cases, the glue device needs to get a reference to the original DT node
      in order for the main driver to access properties and child nodes.
      
      For example, the sunxi-musb driver creates such a glue device using
      platform_device_register_full().  Consequently, devices attached to
      this USB interface don't get associated with DT nodes, if present,
      the way they do with EHCI.
      
      This change will allow sunxi-musb and similar drivers to easily
      propagate the DT node to child devices as required.
      Signed-off-by: NMans Rullgard <mans@mansr.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2c1ea6ab
  4. 22 2月, 2019 1 次提交
  5. 21 2月, 2019 1 次提交
  6. 12 2月, 2019 1 次提交
  7. 05 1月, 2019 1 次提交
    • Q
      drivers/base/platform.c: kmemleak ignore a known leak · 967d3010
      Qian Cai 提交于
      unreferenced object 0xffff808ec6dc5a80 (size 128):
        comm "swapper/0", pid 1, jiffies 4294938063 (age 2560.530s)
        hex dump (first 32 bytes):
          ff ff ff ff 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b  ........kkkkkkkk
          6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
        backtrace:
          [<00000000476dcf8c>] kmem_cache_alloc_trace+0x430/0x500
          [<000000004f708d37>] platform_device_register_full+0xbc/0x1e8
          [<000000006c2a7ec7>] acpi_create_platform_device+0x370/0x450
          [<00000000ef135642>] acpi_default_enumeration+0x34/0x78
          [<000000003bd9a052>] acpi_bus_attach+0x2dc/0x3e0
          [<000000003cf4f7f2>] acpi_bus_attach+0x108/0x3e0
          [<000000003cf4f7f2>] acpi_bus_attach+0x108/0x3e0
          [<000000002968643e>] acpi_bus_scan+0xb0/0x110
          [<0000000010dd0bd7>] acpi_scan_init+0x1a8/0x410
          [<00000000965b3c5a>] acpi_init+0x408/0x49c
          [<00000000ed4b9fe2>] do_one_initcall+0x178/0x7f4
          [<00000000a5ac5a74>] kernel_init_freeable+0x9d4/0xa9c
          [<0000000070ea6c15>] kernel_init+0x18/0x138
          [<00000000fb8fff06>] ret_from_fork+0x10/0x1c
          [<0000000041273a0d>] 0xffffffffffffffff
      
      Then, faddr2line pointed out this line,
      
      /*
       * This memory isn't freed when the device is put,
       * I don't have a nice idea for that though.  Conceptually
       * dma_mask in struct device should not be a pointer.
       * See http://thread.gmane.org/gmane.linux.kernel.pci/9081
       */
      pdev->dev.dma_mask =
      	kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
      
      Since this leak has existed for more than 8 years and it does not
      reference other parts of the memory, let kmemleak ignore it, so users
      don't need to waste time reporting this in the future.
      
      Link: http://lkml.kernel.org/r/20181206160751.36211-1-cai@gmx.usSigned-off-by: NQian Cai <cai@gmx.us>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      967d3010
  8. 14 12月, 2018 2 次提交
  9. 06 12月, 2018 1 次提交
  10. 27 11月, 2018 1 次提交
  11. 31 10月, 2018 1 次提交
  12. 02 10月, 2018 1 次提交
  13. 01 10月, 2018 1 次提交
  14. 15 5月, 2018 1 次提交
  15. 03 5月, 2018 2 次提交
  16. 15 3月, 2018 1 次提交
  17. 08 12月, 2017 2 次提交
    • G
      driver core: Remove redundant license text · 32825709
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all driver core files, that identifies the
      license in a specific and legally-defined manner.  So the extra GPL text
      wording can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      32825709
    • G
      driver core: add SPDX identifiers to all driver core files · 989d42e8
      Greg Kroah-Hartman 提交于
      It's good to have SPDX identifiers in all files to make it easier to
      audit the kernel tree for correct licenses.
      
      Update the driver core files files with the correct SPDX license
      identifier based on the license text in the file itself.  The SPDX
      identifier is a legally binding shorthand, which can be used instead of
      the full boiler plate text.
      
      This work is based on a script and data from Thomas Gleixner, Philippe
      Ombredanne, and Kate Stewart.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      989d42e8
  18. 19 10月, 2017 1 次提交
    • R
      drivers: flag buses which demand DMA configuration · d89e2378
      Robin Murphy 提交于
      We do not want the common dma_configure() pathway to apply
      indiscriminately to all devices, since there are plenty of buses which
      do not have DMA capability, and if their child devices were used for
      DMA API calls it would only be indicative of a driver bug. However,
      there are a number of buses for which DMA is implicitly expected even
      when not described by firmware - those we whitelist with an automatic
      opt-in to dma_configure(), assuming that the DMA address space and the
      physical address space are equivalent if not otherwise specified.
      
      Commit 72328883 ("of: restrict DMA configuration") introduced a
      short-term fix by comparing explicit bus types, but this approach is far
      from pretty, doesn't scale well, and fails to cope at all with bus
      drivers which may be built as modules, like host1x. Let's refine things
      by making that opt-in a property of the bus type, which neatly addresses
      those problems and lets the decision of whether firmware description of
      DMA capability should be optional or mandatory stay internal to the bus
      drivers themselves.
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      d89e2378
  19. 18 9月, 2017 1 次提交
  20. 03 7月, 2017 1 次提交
  21. 25 5月, 2017 1 次提交
  22. 23 3月, 2017 1 次提交
    • R
      of: Add function for generating a DT modalias with a newline · 0634c295
      Rob Herring 提交于
      The modalias sysfs attr is lacking a newline for DT aliases on platform
      devices. The macio and ibmebus correctly add the newline, but open code it.
      Introduce a new function, of_device_modalias(), that fills the buffer with
      the modalias including the newline and update users of the old
      of_device_get_modalias function.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0634c295
  23. 03 2月, 2017 1 次提交
  24. 11 1月, 2017 1 次提交
  25. 27 9月, 2016 1 次提交
  26. 31 8月, 2016 2 次提交
  27. 09 4月, 2016 1 次提交
  28. 16 2月, 2016 1 次提交
  29. 10 2月, 2016 1 次提交
  30. 27 1月, 2016 1 次提交
    • M
      base/platform: Fix platform drivers with no probe callback · 25cad69f
      Martin Wilck 提交于
      Since b8b2c7d8, platform_drv_probe() is called for all platform
      devices. If drv->probe is NULL, and dev_pm_domain_attach() fails,
      platform_drv_probe() will return the error code from dev_pm_domain_attach().
      
      This causes real_probe() to enter the "probe_failed" path and set
      dev->driver to NULL. Before b8b2c7d8, real_probe() would assume
      success if both dev->bus->probe and drv->probe were missing. As a result,
      a device and driver could be "bound" together just by matching their names;
      this doesn't work any more after b8b2c7d8.
      
      This may cause problems later for certain usage of platform_driver_register()
      and platform_device_register_simple(). I observed a panic while loading
      the tpm_tis driver with parameter "force=1" (i.e. registering tpm_tis as
      a platform driver), because tpm_tis_init's assumption that the device
      returned by platform_device_register_simple() was bound didn't hold any more
      (tpmm_chip_alloc() dereferences chip->pdev->driver, causing panic).
      
      This patch restores the previous (4.3.0 and earlier) behavior of
      platform_drv_probe() in the case when the associated platform driver has
      no "probe" function.
      
      Fixes: b8b2c7d8 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
      Signed-off-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com>
      Cc: stable <stable@vger.kernel.org> # 4.4
      Cc: Martin Fuzzey <mfuzzey@parkeon.com>
      Acked-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      25cad69f
  31. 12 1月, 2016 1 次提交
  32. 07 1月, 2016 1 次提交
    • S
      driver-core: platform: Add platform_irq_count() · 4b83555d
      Stephen Boyd 提交于
      A recent patch added calls to of_irq_count() in the qcom pinctrl
      drivers and that caused module build failures because
      of_irq_count() is not an exported symbol. We shouldn't export
      of_irq_count() to modules because it's an internal OF API that
      shouldn't be used by drivers. Platform drivers should use
      platform device APIs instead. Therefore, add a platform_irq_count()
      API that mirrors the of_irq_count() API so that platform drivers
      can stay DT agnostic.
      
      Cc: Andy Gross <andy.gross@linaro.org>
      Acked-by: NRob Herring <robh@kernel.org>
      Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      4b83555d
  33. 07 12月, 2015 1 次提交
  34. 05 10月, 2015 2 次提交