diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2018-11-22 14:11:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-26 18:59:48 +0300 |
commit | ce0925e8c2f85f6bbf5d24b56621336cceaf743d (patch) | |
tree | 0e97e539e9fb5ebde9f49ae32ffbd3e8ec7055c2 /drivers/misc/mei/hw-me.c | |
parent | 986fb2e0532b1b0fa1e8312fbc38b9e7ed826547 (diff) | |
download | linux-ce0925e8c2f85f6bbf5d24b56621336cceaf743d.tar.xz |
mei: dma ring buffers allocation
Allocate DMA ring buffers from managed coherent memory.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/hw-me.c')
-rw-r--r-- | drivers/misc/mei/hw-me.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 0759c3a668de..3fbbadfa2ae1 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c @@ -1471,15 +1471,21 @@ struct mei_device *mei_me_dev_init(struct pci_dev *pdev, { struct mei_device *dev; struct mei_me_hw *hw; + int i; dev = devm_kzalloc(&pdev->dev, sizeof(struct mei_device) + sizeof(struct mei_me_hw), GFP_KERNEL); if (!dev) return NULL; + hw = to_me_hw(dev); + for (i = 0; i < DMA_DSCR_NUM; i++) + dev->dr_dscr[i].size = cfg->dma_size[i]; + mei_device_init(dev, &pdev->dev, &mei_me_hw_ops); hw->cfg = cfg; + return dev; } |