| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Faraday FTMAC100 10/100 Ethernet |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * (C) Copyright 2009-2011 Faraday Technology |
|---|
| 5 | 6 | * Po-Yu Chuang <ratbert@faraday-tech.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 9 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 10 | | - * (at your option) any later version. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program; if not, write to the Free Software |
|---|
| 19 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 20 | 7 | */ |
|---|
| 21 | 8 | |
|---|
| 22 | 9 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 36 | 23 | #include "ftmac100.h" |
|---|
| 37 | 24 | |
|---|
| 38 | 25 | #define DRV_NAME "ftmac100" |
|---|
| 39 | | -#define DRV_VERSION "0.2" |
|---|
| 40 | 26 | |
|---|
| 41 | 27 | #define RX_QUEUE_ENTRIES 128 /* must be power of 2 */ |
|---|
| 42 | 28 | #define TX_QUEUE_ENTRIES 16 /* must be power of 2 */ |
|---|
| .. | .. |
|---|
| 734 | 720 | { |
|---|
| 735 | 721 | int i; |
|---|
| 736 | 722 | |
|---|
| 737 | | - priv->descs = dma_zalloc_coherent(priv->dev, |
|---|
| 738 | | - sizeof(struct ftmac100_descs), |
|---|
| 739 | | - &priv->descs_dma_addr, |
|---|
| 740 | | - GFP_KERNEL); |
|---|
| 723 | + priv->descs = dma_alloc_coherent(priv->dev, |
|---|
| 724 | + sizeof(struct ftmac100_descs), |
|---|
| 725 | + &priv->descs_dma_addr, GFP_KERNEL); |
|---|
| 741 | 726 | if (!priv->descs) |
|---|
| 742 | 727 | return -ENOMEM; |
|---|
| 743 | 728 | |
|---|
| .. | .. |
|---|
| 823 | 808 | struct ethtool_drvinfo *info) |
|---|
| 824 | 809 | { |
|---|
| 825 | 810 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
|---|
| 826 | | - strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
|---|
| 827 | 811 | strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info)); |
|---|
| 828 | 812 | } |
|---|
| 829 | 813 | |
|---|
| .. | .. |
|---|
| 1073 | 1057 | struct ftmac100 *priv; |
|---|
| 1074 | 1058 | int err; |
|---|
| 1075 | 1059 | |
|---|
| 1076 | | - if (!pdev) |
|---|
| 1077 | | - return -ENODEV; |
|---|
| 1078 | | - |
|---|
| 1079 | 1060 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 1080 | 1061 | if (!res) |
|---|
| 1081 | 1062 | return -ENXIO; |
|---|
| .. | .. |
|---|
| 1198 | 1179 | *****************************************************************************/ |
|---|
| 1199 | 1180 | static int __init ftmac100_init(void) |
|---|
| 1200 | 1181 | { |
|---|
| 1201 | | - pr_info("Loading version " DRV_VERSION " ...\n"); |
|---|
| 1202 | 1182 | return platform_driver_register(&ftmac100_driver); |
|---|
| 1203 | 1183 | } |
|---|
| 1204 | 1184 | |
|---|