| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Freescale CPM1/CPM2 I2C interface. |
|---|
| 3 | 4 | * Copyright (c) 1999 Dan Malek (dmalek@jlc.net). |
|---|
| .. | .. |
|---|
| 13 | 14 | * |
|---|
| 14 | 15 | * Converted to of_platform_device. Renamed to i2c-cpm.c. |
|---|
| 15 | 16 | * (C) 2007,2008 Jochen Friedrich <jochen@scram.de> |
|---|
| 16 | | - * |
|---|
| 17 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 18 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 19 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 20 | | - * (at your option) any later version. |
|---|
| 21 | | - * |
|---|
| 22 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 23 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 24 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 25 | | - * GNU General Public License for more details. |
|---|
| 26 | 17 | */ |
|---|
| 27 | 18 | |
|---|
| 28 | 19 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 543 | 534 | } |
|---|
| 544 | 535 | out_be32(&rbdf[i].cbd_bufaddr, ((cpm->rxdma[i] + 1) & ~1)); |
|---|
| 545 | 536 | |
|---|
| 546 | | - cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1, &cpm->txdma[i], GFP_KERNEL); |
|---|
| 537 | + cpm->txbuf[i] = dma_alloc_coherent(&cpm->ofdev->dev, |
|---|
| 538 | + CPM_MAX_READ + 1, |
|---|
| 539 | + &cpm->txdma[i], GFP_KERNEL); |
|---|
| 547 | 540 | if (!cpm->txbuf[i]) { |
|---|
| 548 | 541 | ret = -ENOMEM; |
|---|
| 549 | 542 | goto out_muram; |
|---|