1. 03 Jul, 2019 12 commits
  2. 26 Jun, 2019 1 commit
  3. 24 Jun, 2019 6 commits
    • Suzuki K Poulose's avatar
      drivers: Add generic helper to match by of_node · 65b66682
      Suzuki K Poulose authored
      Add a helper to match device by the of_node. This will be later used
      to provide wrappers to the device iterators for {bus/class/driver}_find_device().
      Convert other users to reuse this new helper.
      
      Cc: Alan Tull <atull@kernel.org>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: devicetree@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: linux-fpga@vger.kernel.org
      Cc: linux-i2c@vger.kernel.org
      Cc: linux-spi@vger.kernel.org
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Moritz Fischer <mdf@kernel.org>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Thor Thayer <thor.thayer@linux.intel.com>
      Cc: Wolfram Sang <wsa@the-dreams.de>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      65b66682
    • Suzuki K Poulose's avatar
      driver_find_device: Unify the match function with class_find_device() · 92ce7e83
      Suzuki K Poulose authored
      The driver_find_device() accepts a match function pointer to
      filter the devices for lookup, similar to bus/class_find_device().
      However, there is a minor difference in the prototype for the
      match parameter for driver_find_device() with the now unified
      version accepted by {bus/class}_find_device(), where it doesn't
      accept a "const" qualifier for the data argument. This prevents
      us from reusing the generic match functions for driver_find_device().
      
      For this reason, change the prototype of the driver_find_device() to
      make the "match" parameter in line with {bus/class}_find_device()
      and adjust its callers to use the const qualifier. Also, we could
      now promote the "data" parameter to const as we pass it down
      as a const parameter to the match functions.
      
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
      Cc: Sebastian Ott <sebott@linux.ibm.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Nehal Shah <nehal-bakulchandra.shah@amd.com>
      Cc: Shyam Sundar S K <shyam-sundar.s-k@amd.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92ce7e83
    • Suzuki K Poulose's avatar
      bus_find_device: Unify the match callback with class_find_device · 418e3ea1
      Suzuki K Poulose authored
      There is an arbitrary difference between the prototypes of
      bus_find_device() and class_find_device() preventing their callers
      from passing the same pair of data and match() arguments to both of
      them, which is the const qualifier used in the prototype of
      class_find_device().  If that qualifier is also used in the
      bus_find_device() prototype, it will be possible to pass the same
      match() callback function to both bus_find_device() and
      class_find_device(), which will allow some optimizations to be made in
      order to avoid code duplication going forward.  Also with that, constify
      the "data" parameter as it is passed as a const to the match function.
      
      For this reason, change the prototype of bus_find_device() to match
      the prototype of class_find_device() and adjust its callers to use the
      const qualifier in accordance with the new prototype of it.
      
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Andreas Noever <andreas.noever@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: David Kershner <david.kershner@unisys.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Harald Freudenberger <freude@linux.ibm.com>
      Cc: Hartmut Knaack <knaack.h@gmx.de>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jonathan Cameron <jic23@kernel.org>
      Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michael Jamet <michael.jamet@intel.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
      Cc: Sebastian Ott <sebott@linux.ibm.com>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
      Cc: rafael@kernel.org
      Acked-by: default avatarCorey Minyard <minyard@acm.org>
      Acked-by: default avatarDavid Kershner <david.kershner@unisys.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Acked-by: Wolfram Sang <wsa@the-dreams.de> # for the I2C parts
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      418e3ea1
    • Suzuki K Poulose's avatar
      acpi: utils: Cleanup acpi_dev_match_cb · e6374f6b
      Suzuki K Poulose authored
      The prototype of bus_find_device() will be unified with that of
      class_find_device() subsequently, but for this purpose the callback
      functions passed to it need to take (const void *) as the second
      argument.  Consequently, they cannot modify the memory pointed to by
      that argument which currently is not the case for acpi_dev_match_cb().
      However, acpi_dev_match_cb() really need not modify the "match" object
      passed to it, because acpi_dev_get_first_match_dev() which uses it via
      bus_find_device() can easily convert the result of bus_find_device()
      into the pointer to return.
      
      For this reason, update acpi_dev_match_cb() to avoid the redundant
      memory updates.
      
      Cc: Len Brown <lenb@kernel.org>
      Cc: linux-acpi@vger.kernel.org
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e6374f6b
    • Suzuki K Poulose's avatar
      mfd: Remove unused helper syscon_regmap_lookup_by_pdevname · 29d14b66
      Suzuki K Poulose authored
      Nobody uses the exported helper syscon_regmap_lookup_by_pdevname,
      to lookup a device by name. Let us remove it.
      Suggested-by: default avatarArnd Bergman <arnd@arnd.de>
      Cc: Arnd Bergman <arnd@arnd.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      29d14b66
    • Suzuki K Poulose's avatar
      staging: most-core: Use bus_find_device_by_name · 209de310
      Suzuki K Poulose authored
      Use bus_find_device_by_name() helper instead of writing our
      own helper.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Christian Gromm <christian.gromm@microchip.com>
      Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      209de310
  4. 23 Jun, 2019 1 commit
  5. 21 Jun, 2019 20 commits