mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
HID: amd_sfh: Use dma_set_mask_and_coherent()
Use dma_set_mask_and_coherent() to set both the streaming and coherent masks. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
e70b703347
commit
c45d2b54cc
1 changed files with 6 additions and 3 deletions
|
@ -245,10 +245,13 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
|
|||
|
||||
privdata->mmio = pcim_iomap_table(pdev)[2];
|
||||
pci_set_master(pdev);
|
||||
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
|
||||
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (rc) {
|
||||
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||
return rc;
|
||||
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "failed to set DMA mask\n");
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
privdata->cl_data = devm_kzalloc(&pdev->dev, sizeof(struct amdtp_cl_data), GFP_KERNEL);
|
||||
|
|
Loading…
Reference in a new issue