summaryrefslogtreecommitdiff
path: root/drivers/media/pci/tw68/tw68-risc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/tw68/tw68-risc.c')
-rw-r--r--drivers/media/pci/tw68/tw68-risc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/media/pci/tw68/tw68-risc.c b/drivers/media/pci/tw68/tw68-risc.c
index 82ff9c9494f3..e793db6134e4 100644
--- a/drivers/media/pci/tw68/tw68-risc.c
+++ b/drivers/media/pci/tw68/tw68-risc.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* tw68_risc.c
* Part of the device driver for Techwell 68xx based cards
@@ -13,17 +14,7 @@
*
* Refactored and updated to the latest v4l core frameworks:
*
- * Copyright (C) 2014 Hans Verkuil <hverkuil@xs4all.nl>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Copyright (C) 2014 Hans Verkuil <hverkuil@kernel.org>
*/
#include "tw68.h"
@@ -160,7 +151,8 @@ int tw68_risc_buffer(struct pci_dev *pci,
instructions = fields * (1 + (((bpl + padding) * lines) /
PAGE_SIZE) + lines) + 4;
buf->size = instructions * 8;
- buf->cpu = pci_alloc_consistent(pci, buf->size, &buf->dma);
+ buf->cpu = dma_alloc_coherent(&pci->dev, buf->size, &buf->dma,
+ GFP_KERNEL);
if (buf->cpu == NULL)
return -ENOMEM;