summaryrefslogtreecommitdiff
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-12 14:16:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-12 14:16:34 +0200
commitf27ae3a6cebc18a864e1dbee98c9e6c12e72b526 (patch)
treed849692ee9521805b43bbec9df395d26b72848e0 /drivers/base/platform.c
parent4f894483c902a49d428348f6ec8874fce59c63cb (diff)
parent82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3 (diff)
Merge 6.15-rc6 into driver-core-next
We need the driver core fix in here as well for testing Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 63dfa41f0904..075ec1d1b73a 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -1440,7 +1440,7 @@ static void platform_shutdown(struct device *_dev)
static int platform_dma_configure(struct device *dev)
{
- struct platform_driver *drv = to_platform_driver(dev->driver);
+ struct device_driver *drv = READ_ONCE(dev->driver);
struct fwnode_handle *fwnode = dev_fwnode(dev);
enum dev_dma_attr attr;
int ret = 0;
@@ -1451,8 +1451,8 @@ static int platform_dma_configure(struct device *dev)
attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
ret = acpi_dma_configure(dev, attr);
}
- /* @drv may not be valid when we're called from the IOMMU layer */
- if (ret || !dev->driver || drv->driver_managed_dma)
+ /* @dev->driver may not be valid when we're called from the IOMMU layer */
+ if (ret || !drv || to_platform_driver(drv)->driver_managed_dma)
return ret;
ret = iommu_device_use_default_domain(dev);