hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/ethernet/faraday/ftmac100.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Faraday FTMAC100 10/100 Ethernet
34 *
45 * (C) Copyright 2009-2011 Faraday Technology
56 * 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.
207 */
218
229 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -36,7 +23,6 @@
3623 #include "ftmac100.h"
3724
3825 #define DRV_NAME "ftmac100"
39
-#define DRV_VERSION "0.2"
4026
4127 #define RX_QUEUE_ENTRIES 128 /* must be power of 2 */
4228 #define TX_QUEUE_ENTRIES 16 /* must be power of 2 */
....@@ -734,10 +720,9 @@
734720 {
735721 int i;
736722
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);
741726 if (!priv->descs)
742727 return -ENOMEM;
743728
....@@ -823,7 +808,6 @@
823808 struct ethtool_drvinfo *info)
824809 {
825810 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
826
- strlcpy(info->version, DRV_VERSION, sizeof(info->version));
827811 strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info));
828812 }
829813
....@@ -1073,9 +1057,6 @@
10731057 struct ftmac100 *priv;
10741058 int err;
10751059
1076
- if (!pdev)
1077
- return -ENODEV;
1078
-
10791060 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
10801061 if (!res)
10811062 return -ENXIO;
....@@ -1198,7 +1179,6 @@
11981179 *****************************************************************************/
11991180 static int __init ftmac100_init(void)
12001181 {
1201
- pr_info("Loading version " DRV_VERSION " ...\n");
12021182 return platform_driver_register(&ftmac100_driver);
12031183 }
12041184