.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * sata_via.c - VIA Serial ATA controllers |
---|
3 | 4 | * |
---|
.. | .. |
---|
8 | 9 | * Copyright 2003-2004 Red Hat, Inc. All rights reserved. |
---|
9 | 10 | * Copyright 2003-2004 Jeff Garzik |
---|
10 | 11 | * |
---|
11 | | - * |
---|
12 | | - * This program is free software; you can redistribute it and/or modify |
---|
13 | | - * it under the terms of the GNU General Public License as published by |
---|
14 | | - * the Free Software Foundation; either version 2, or (at your option) |
---|
15 | | - * any later version. |
---|
16 | | - * |
---|
17 | | - * This program is distributed in the hope that it will be useful, |
---|
18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 | | - * GNU General Public License for more details. |
---|
21 | | - * |
---|
22 | | - * You should have received a copy of the GNU General Public License |
---|
23 | | - * along with this program; see the file COPYING. If not, write to |
---|
24 | | - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
25 | | - * |
---|
26 | | - * |
---|
27 | 12 | * libata documentation is available via 'make {ps|pdf}docs', |
---|
28 | 13 | * as Documentation/driver-api/libata.rst |
---|
29 | 14 | * |
---|
30 | 15 | * Hardware documentation available under NDA. |
---|
31 | | - * |
---|
32 | | - * |
---|
33 | | - * |
---|
34 | 16 | */ |
---|
35 | 17 | |
---|
36 | 18 | #include <linux/kernel.h> |
---|
.. | .. |
---|
523 | 505 | for (i = 0; i < host->n_ports; i++) |
---|
524 | 506 | vt6421_init_addrs(host->ports[i]); |
---|
525 | 507 | |
---|
526 | | - rc = dma_set_mask(&pdev->dev, ATA_DMA_MASK); |
---|
527 | | - if (rc) |
---|
528 | | - return rc; |
---|
529 | | - rc = dma_set_coherent_mask(&pdev->dev, ATA_DMA_MASK); |
---|
530 | | - if (rc) |
---|
531 | | - return rc; |
---|
532 | | - |
---|
533 | | - return 0; |
---|
| 508 | + return dma_set_mask_and_coherent(&pdev->dev, ATA_DMA_MASK); |
---|
534 | 509 | } |
---|
535 | 510 | |
---|
536 | 511 | static int vt8251_prepare_host(struct pci_dev *pdev, struct ata_host **r_host) |
---|