hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/net/ethernet/ti/cpsw-phy-sel.c
....@@ -1,17 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /* Texas Instruments Ethernet Switch Driver
23 *
34 * Copyright (C) 2013 Texas Instruments
45 *
56 * Module Author: Mugunthan V N <mugunthanvnm@ti.com>
67 *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * version 2 as published by the Free Software Foundation.
10
- *
11
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12
- * kind, whether express or implied; without even the implied warranty
13
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
158 */
169
1710 #include <linux/platform_device.h>
....@@ -74,11 +67,11 @@
7467 dev_warn(priv->dev,
7568 "Unsupported PHY mode: \"%s\". Defaulting to MII.\n",
7669 phy_modes(phy_mode));
77
- /* fallthrough */
70
+ fallthrough;
7871 case PHY_INTERFACE_MODE_MII:
7972 mode = AM33XX_GMII_SEL_MODE_MII;
8073 break;
81
- };
74
+ }
8275
8376 mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6);
8477 mask |= BIT(slave + 4);
....@@ -129,11 +122,11 @@
129122 dev_warn(priv->dev,
130123 "Unsupported PHY mode: \"%s\". Defaulting to MII.\n",
131124 phy_modes(phy_mode));
132
- /* fallthrough */
125
+ fallthrough;
133126 case PHY_INTERFACE_MODE_MII:
134127 mode = AM33XX_GMII_SEL_MODE_MII;
135128 break;
136
- };
129
+ }
137130
138131 switch (slave) {
139132 case 0:
....@@ -158,9 +151,9 @@
158151 }
159152
160153 static struct platform_driver cpsw_phy_sel_driver;
161
-static int match(struct device *dev, void *data)
154
+static int match(struct device *dev, const void *data)
162155 {
163
- struct device_node *node = (struct device_node *)data;
156
+ const struct device_node *node = (const struct device_node *)data;
164157 return dev->of_node == node &&
165158 dev->driver == &cpsw_phy_sel_driver.driver;
166159 }