media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers
authorHans de Goede <hdegoede@redhat.com>
Sat, 5 May 2018 08:22:08 +0000 (04:22 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sat, 5 May 2018 15:42:43 +0000 (11:42 -0400)
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" <mcgrof@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/gspca/jl2005bcd.c
drivers/media/usb/gspca/sq905.c
drivers/media/usb/gspca/sq905c.c
drivers/media/usb/gspca/vicam.c

index d668589598d642e4abf52d432eeb5dc63938f268..c40245950553bd502a4fce77d4dca49da79637cd 100644 (file)
@@ -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;
index cc8ff41b8ab3a7d83f810aabc213377c7982a389..ffea9c35b0a0659c05c089165bb634476d24d598 100644 (file)
@@ -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;
index 5e1269eb7c50fde1514bfb1222e7c1d33435e013..274921c0bb4659f3ca96af4fa93861611a20fabc 100644 (file)
@@ -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;
index 554b90ef2200bf928686e83bec938d8d4f6588a1..8562bda0ef88609da08da0e93da49733a2bcaa6b 100644 (file)
@@ -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;