summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-10-14 22:53:11 +0200
committerMark Brown <broonie@kernel.org>2023-10-16 16:08:39 +0100
commita8ecbc54165fca767e75a82372a7be3810c667cf (patch)
treee71824e0fbf9c875c90f543e083d09d27beef466 /drivers/spi
parentf6d7f050e258e3c71e310f5167c4d65bbefaeb31 (diff)
spi: Export acpi_spi_find_controller_by_adev()
Export acpi_spi_find_controller_by_adev() so that ACPI glue code which wants to dynamically create a spi_device using acpi_spi_device_alloc() or spi_new_device() on a controller, to which the code does not already have a reference, can find the controller. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231014205314.59333-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ac518be34917..791df0e69105 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2523,8 +2523,6 @@ static void acpi_spi_parse_apple_properties(struct acpi_device *dev,
lookup->mode |= SPI_CPHA;
}
-static struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev);
-
static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
{
struct acpi_spi_lookup *lookup = data;
@@ -4519,7 +4517,7 @@ static int spi_acpi_controller_match(struct device *dev, const void *data)
return ACPI_COMPANION(dev->parent) == data;
}
-static struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev)
+struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev)
{
struct device *dev;
@@ -4533,6 +4531,7 @@ static struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_devic
return container_of(dev, struct spi_controller, dev);
}
+EXPORT_SYMBOL_GPL(acpi_spi_find_controller_by_adev);
static struct spi_device *acpi_spi_find_device_by_adev(struct acpi_device *adev)
{