From: Hans de Goede Date: Sat, 5 May 2018 08:22:08 +0000 (-0400) Subject: media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5334b3426ac9a57f4103275cfbd7e37b18851308;p=openwrt%2Fstaging%2Fblogic.git media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers The recent "x86 ZONE_DMA love" discussion at LSF/MM pointed out that some gspca sub-drivvers are using GFP_DMA to allocate buffers which are used for USB bulk transfers, there is absolutely no need for this, drop it. Cc: "Luis R. Rodriguez" Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c index d668589598d6..c40245950553 100644 --- a/drivers/media/usb/gspca/jl2005bcd.c +++ b/drivers/media/usb/gspca/jl2005bcd.c @@ -321,7 +321,7 @@ static void jl2005c_dostream(struct work_struct *work) int ret; u8 *buffer; - buffer = kmalloc(JL2005C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(JL2005C_MAX_TRANSFER, GFP_KERNEL); if (!buffer) { pr_err("Couldn't allocate USB buffer\n"); goto quit_stream; diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c index cc8ff41b8ab3..ffea9c35b0a0 100644 --- a/drivers/media/usb/gspca/sq905.c +++ b/drivers/media/usb/gspca/sq905.c @@ -217,7 +217,7 @@ static void sq905_dostream(struct work_struct *work) u8 *data; u8 *buffer; - buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL); if (!buffer) { pr_err("Couldn't allocate USB buffer\n"); goto quit_stream; diff --git a/drivers/media/usb/gspca/sq905c.c b/drivers/media/usb/gspca/sq905c.c index 5e1269eb7c50..274921c0bb46 100644 --- a/drivers/media/usb/gspca/sq905c.c +++ b/drivers/media/usb/gspca/sq905c.c @@ -138,7 +138,7 @@ static void sq905c_dostream(struct work_struct *work) int ret; u8 *buffer; - buffer = kmalloc(SQ905C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(SQ905C_MAX_TRANSFER, GFP_KERNEL); if (!buffer) { pr_err("Couldn't allocate USB buffer\n"); goto quit_stream; diff --git a/drivers/media/usb/gspca/vicam.c b/drivers/media/usb/gspca/vicam.c index 554b90ef2200..8562bda0ef88 100644 --- a/drivers/media/usb/gspca/vicam.c +++ b/drivers/media/usb/gspca/vicam.c @@ -182,7 +182,7 @@ static void vicam_dostream(struct work_struct *work) frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage + HEADER_SIZE; - buffer = kmalloc(frame_sz, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(frame_sz, GFP_KERNEL); if (!buffer) { pr_err("Couldn't allocate USB buffer\n"); goto exit;