| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* Texas Instruments Ethernet Switch Driver |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (C) 2013 Texas Instruments |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Module Author: Mugunthan V N <mugunthanvnm@ti.com> |
|---|
| 6 | 7 | * |
|---|
| 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. |
|---|
| 15 | 8 | */ |
|---|
| 16 | 9 | |
|---|
| 17 | 10 | #include <linux/platform_device.h> |
|---|
| .. | .. |
|---|
| 74 | 67 | dev_warn(priv->dev, |
|---|
| 75 | 68 | "Unsupported PHY mode: \"%s\". Defaulting to MII.\n", |
|---|
| 76 | 69 | phy_modes(phy_mode)); |
|---|
| 77 | | - /* fallthrough */ |
|---|
| 70 | + fallthrough; |
|---|
| 78 | 71 | case PHY_INTERFACE_MODE_MII: |
|---|
| 79 | 72 | mode = AM33XX_GMII_SEL_MODE_MII; |
|---|
| 80 | 73 | break; |
|---|
| 81 | | - }; |
|---|
| 74 | + } |
|---|
| 82 | 75 | |
|---|
| 83 | 76 | mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); |
|---|
| 84 | 77 | mask |= BIT(slave + 4); |
|---|
| .. | .. |
|---|
| 129 | 122 | dev_warn(priv->dev, |
|---|
| 130 | 123 | "Unsupported PHY mode: \"%s\". Defaulting to MII.\n", |
|---|
| 131 | 124 | phy_modes(phy_mode)); |
|---|
| 132 | | - /* fallthrough */ |
|---|
| 125 | + fallthrough; |
|---|
| 133 | 126 | case PHY_INTERFACE_MODE_MII: |
|---|
| 134 | 127 | mode = AM33XX_GMII_SEL_MODE_MII; |
|---|
| 135 | 128 | break; |
|---|
| 136 | | - }; |
|---|
| 129 | + } |
|---|
| 137 | 130 | |
|---|
| 138 | 131 | switch (slave) { |
|---|
| 139 | 132 | case 0: |
|---|
| .. | .. |
|---|
| 158 | 151 | } |
|---|
| 159 | 152 | |
|---|
| 160 | 153 | 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) |
|---|
| 162 | 155 | { |
|---|
| 163 | | - struct device_node *node = (struct device_node *)data; |
|---|
| 156 | + const struct device_node *node = (const struct device_node *)data; |
|---|
| 164 | 157 | return dev->of_node == node && |
|---|
| 165 | 158 | dev->driver == &cpsw_phy_sel_driver.driver; |
|---|
| 166 | 159 | } |
|---|