1. 04 Jun, 2014 2 commits
    • Florian Fainelli's avatar
      of: handle NULL node in next_child iterators · 43cb4367
      Florian Fainelli authored
      Add an early check for the node argument in __of_get_next_child and
      of_get_next_available_child() to avoid dereferencing a NULL node pointer
      a few lines after.
      
      CC: Daniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      43cb4367
    • Arnd Bergmann's avatar
      of/irq: provide more wrappers for !CONFIG_OF · 64c5c759
      Arnd Bergmann authored
      The pci-rcar driver is enabled for compile tests, and this has
      now shown that the driver cannot build without CONFIG_OF,
      following the inclusion of f8f2fe73 "PCI: rcar: Use new OF
      interrupt mapping when possible":
      
      drivers/built-in.o: In function `rcar_pci_map_irq':
      :(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'
      pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init':
      pci/host/pcie-rcar.c:875:2: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration]
      
      As pointed out by Ben Dooks and Geert Uytterhoeven, this is actually
      supposed to build fine, which we can achieve if we make the
      declaration of of_irq_parse_and_map_pci conditional on CONFIG_OF
      and provide an empty inline function otherwise, as we do for
      a lot of other of interfaces.
      
      This lets us build the rcar_pci driver again without CONFIG_OF
      for build testing. All platforms using this driver select OF,
      so this doesn't change anything for the users.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: devicetree@vger.kernel.org
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Magnus Damm <damm@opensource.se>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ben Dooks <ben.dooks@codethink.co.uk>
      Cc: linux-pci@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      [robh: drop wrappers for of_n_addr_cells and of_n_size_cells which are
      low-level functions that should not be used for !OF]
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      64c5c759
  2. 28 May, 2014 4 commits
  3. 27 May, 2014 1 commit
  4. 23 May, 2014 7 commits
  5. 22 May, 2014 4 commits
    • Xiubo Li's avatar
      of: fix race between search and remove in of_update_property() · 947fdaad
      Xiubo Li authored
      The of_update_property() is intented to update a property in a node
      and if the property does not exist, will add it.
      
      The second search of the property is possibly won't be found, that
      maybe removed by other thread just before the second search begain.
      
      Using the __of_find_property() and __of_add_property() instead and
      move them into lock operations.
      Signed-off-by: default avatarXiubo Li <Li.Xiubo@freescale.com>
      [grant.likely: conflict with another change in same function]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      947fdaad
    • Thierry Reding's avatar
      of: Use NULL for pointers · d2d3d7cd
      Thierry Reding authored
      Commit 44856819 (of/fdt: Clean up casting in unflattening path)
      modified unflatten_dt_node() to take a void * for the mem parameter
      instead of an unsigned long. One of the call sites wasn't updated.
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      
      Conflicts:
      	drivers/of/fdt.c
      d2d3d7cd
    • Grant Likely's avatar
      of: Stop naming platform_device using dcr address · ba52464a
      Grant Likely authored
      There is now a way to ensure all platform devices get a unique name when
      populated from the device tree, and the DCR_NATIVE code path is broken
      anyway. PowerPC Cell (PS3) is the only platform that actually uses this
      path.  Most likely nobody will notice if it is killed. Remove the code
      and associated ugly #ifdef.
      
      The user-visible impact of this patch is that any DCR device on Cell
      will get a new name in the /sys/devices hierarchy.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      ba52464a
    • Grant Likely's avatar
      of: Ensure unique names without sacrificing determinism · 07e461cd
      Grant Likely authored
      The way the driver core is implemented, every device using the same bus
      type is required to have a unique name because a symlink to each device
      is created in the appropriate /sys/bus/*/devices directory, and two
      identical names causes a collision.
      
      The current code handles the requirement by using an globally
      incremented counter that is appended to the device name. It works, but
      it means any change to device registration will change the assigned
      numbers. Instead, if we build up the name by using information from the
      parent nodes, then it can be guaranteed to be unique without adding a
      random number to the end of it.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Cc: Rob Herring <robh@kernel.org>
      07e461cd
  6. 20 May, 2014 17 commits
  7. 13 May, 2014 5 commits