summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpa/mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/mac.c')
-rw-r--r--drivers/net/ethernet/freescale/dpa/mac.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/mac.c b/drivers/net/ethernet/freescale/dpa/mac.c
index 8959592..f937d7a 100644
--- a/drivers/net/ethernet/freescale/dpa/mac.c
+++ b/drivers/net/ethernet/freescale/dpa/mac.c
@@ -52,8 +52,7 @@
| SUPPORTED_Autoneg \
| SUPPORTED_MII)
-static const char phy_str[][11] =
-{
+static const char phy_str[][11] = {
[PHY_INTERFACE_MODE_MII] = "mii",
[PHY_INTERFACE_MODE_GMII] = "gmii",
[PHY_INTERFACE_MODE_SGMII] = "sgmii",
@@ -78,8 +77,7 @@ static phy_interface_t __pure __attribute__((nonnull)) str2phy(const char *str)
return PHY_INTERFACE_MODE_MII;
}
-static const uint16_t phy2speed[] =
-{
+static const uint16_t phy2speed[] = {
[PHY_INTERFACE_MODE_MII] = SPEED_100,
[PHY_INTERFACE_MODE_GMII] = SPEED_1000,
[PHY_INTERFACE_MODE_SGMII] = SPEED_1000,
@@ -94,7 +92,8 @@ static const uint16_t phy2speed[] =
};
static struct mac_device * __cold
-alloc_macdev(struct device *dev, size_t sizeof_priv, void (*setup)(struct mac_device *mac_dev))
+alloc_macdev(struct device *dev, size_t sizeof_priv,
+ void (*setup)(struct mac_device *mac_dev))
{
struct mac_device *mac_dev;
@@ -143,16 +142,18 @@ static int __cold mac_probe(struct platform_device *_of_dev)
const char *char_prop;
const phandle *phandle_prop;
const uint32_t *uint32_prop;
- const struct of_device_id *match;
+ const struct of_device_id *match;
dev = &_of_dev->dev;
mac_node = dev->of_node;
- match = of_match_device(mac_match, dev);
- if (!match)
- return -EINVAL;
+ match = of_match_device(mac_match, dev);
+ if (!match)
+ return -EINVAL;
- for (i = 0; i < ARRAY_SIZE(mac_match) - 1 && match != mac_match + i; i++);
+ for (i = 0; i < ARRAY_SIZE(mac_match) - 1 && match != mac_match + i;
+ i++)
+ ;
BUG_ON(i >= ARRAY_SIZE(mac_match) - 1);
mac_dev = alloc_macdev(dev, mac_sizeof_priv[i], mac_setup[i]);
@@ -217,15 +218,15 @@ static int __cold mac_probe(struct platform_device *_of_dev)
}
mac_dev->vaddr = devm_ioremap(dev, mac_dev->res->start,
- mac_dev->res->end + 1 - mac_dev->res->start);
+ mac_dev->res->end + 1
+ - mac_dev->res->start);
if (unlikely(mac_dev->vaddr == NULL)) {
dev_err(dev, "devm_ioremap() failed\n");
_errno = -EIO;
goto _return_dev_set_drvdata;
}
- /*
- * XXX: Warning, future versions of Linux will most likely not even
+ /* XXX: Warning, future versions of Linux will most likely not even
* call the driver code to allow us to override the TBIPA value,
* we'll need to address this when we move to newer kernel rev
*/
@@ -416,8 +417,7 @@ static int __init __cold mac_load(void)
_errno = platform_driver_register(&mac_driver);
if (unlikely(_errno < 0)) {
- pr_err(KBUILD_MODNAME ": %s:%hu:%s(): " \
- "platform_driver_register() = %d\n",
+ pr_err(KBUILD_MODNAME ": %s:%hu:%s(): platform_driver_register() = %d\n",
KBUILD_BASENAME".c", __LINE__, __func__, _errno);
goto _return;
}