Skip to content

Commit 8a2f38d

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
ACPI / platform: provide default DMA mask
Most devices are configured for 32-bit DMA addresses. Setting the mask to 32-bit here removes the need for the drivers to do it separately. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent f114040 commit 8a2f38d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/acpi/acpi_platform.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/err.h>
1717
#include <linux/kernel.h>
1818
#include <linux/module.h>
19+
#include <linux/dma-mapping.h>
1920
#include <linux/platform_device.h>
2021

2122
#include "internal.h"
@@ -102,6 +103,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
102103
pdevinfo.res = resources;
103104
pdevinfo.num_res = count;
104105
pdevinfo.acpi_node.companion = adev;
106+
pdevinfo.dma_mask = DMA_BIT_MASK(32);
105107
pdev = platform_device_register_full(&pdevinfo);
106108
if (IS_ERR(pdev))
107109
dev_err(&adev->dev, "platform device creation failed: %ld\n",

0 commit comments

Comments
 (0)