lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL
Date
Both pmac_ide_init_dma and ide_dma_sgiioc4 are stored in the init_dma field of
an ide_port_info structure. This field seems to only be called from contexts
where sleep is allowed. Therefore, this patch replaces uses of GFP_ATOMIC by
GFP_KERNEL.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
drivers/ide/pmac.c | 2 +-
drivers/ide/sgiioc4.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1691,7 +1691,7 @@ static int pmac_ide_init_dma(ide_hwif_t
*/
pmif->dma_table_cpu = dma_alloc_coherent(&dev->dev,
(MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
- &hwif->dmatable_dma, GFP_ATOMIC);
+ &hwif->dmatable_dma, GFP_KERNEL);
if (pmif->dma_table_cpu == NULL) {
printk(KERN_ERR "%s: unable to allocate DMA command list\n",
hwif->name);
--- a/drivers/ide/sgiioc4.c
+++ b/drivers/ide/sgiioc4.c
@@ -335,7 +335,7 @@ static int ide_dma_sgiioc4(ide_hwif_t *h
goto dma_pci_alloc_failure;

pad = dma_alloc_coherent(&dev->dev, IOC4_IDE_CACHELINE_SIZE,
- (dma_addr_t *)&hwif->extra_base, GFP_ATOMIC);
+ (dma_addr_t *)&hwif->extra_base, GFP_KERNEL);
if (pad) {
ide_set_hwifdata(hwif, pad);
return 0;

\
 
 \ /
  Last update: 2015-04-09 14:21    [W:0.086 / U:5.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site