mlxsw: minimal: Make structures and variables names shorter
authorVadim Pasternak <vadimp@mellanox.com>
Sun, 3 Mar 2019 09:12:09 +0000 (09:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Mar 2019 06:23:00 +0000 (22:23 -0800)
Replace "mlxsw_minimal" by "mlxsw_m" in order to improve code
readability.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/minimal.c

index 5a6c4457fb550df3e1d814a9bc33c32079690e9d..907e294d65b61712ebb7475ade1e0a2442cbbda9 100644 (file)
 #include "core.h"
 #include "i2c.h"
 
-static const char mlxsw_minimal_driver_name[] = "mlxsw_minimal";
+static const char mlxsw_m_driver_name[] = "mlxsw_minimal";
 
-static const struct mlxsw_config_profile mlxsw_minimal_config_profile;
+static const struct mlxsw_config_profile mlxsw_m_config_profile;
 
-static struct mlxsw_driver mlxsw_minimal_driver = {
-       .kind           = mlxsw_minimal_driver_name,
+static struct mlxsw_driver mlxsw_m_driver = {
+       .kind           = mlxsw_m_driver_name,
        .priv_size      = 1,
-       .profile        = &mlxsw_minimal_config_profile,
+       .profile        = &mlxsw_m_config_profile,
 };
 
-static const struct i2c_device_id mlxsw_minimal_i2c_id[] = {
+static const struct i2c_device_id mlxsw_m_i2c_id[] = {
        { "mlxsw_minimal", 0},
        { },
 };
 
-static struct i2c_driver mlxsw_minimal_i2c_driver = {
+static struct i2c_driver mlxsw_m_i2c_driver = {
        .driver.name = "mlxsw_minimal",
        .class = I2C_CLASS_HWMON,
-       .id_table = mlxsw_minimal_i2c_id,
+       .id_table = mlxsw_m_i2c_id,
 };
 
-static int __init mlxsw_minimal_module_init(void)
+static int __init mlxsw_m_module_init(void)
 {
        int err;
 
-       err = mlxsw_core_driver_register(&mlxsw_minimal_driver);
+       err = mlxsw_core_driver_register(&mlxsw_m_driver);
        if (err)
                return err;
 
-       err = mlxsw_i2c_driver_register(&mlxsw_minimal_i2c_driver);
+       err = mlxsw_i2c_driver_register(&mlxsw_m_i2c_driver);
        if (err)
                goto err_i2c_driver_register;
 
        return 0;
 
 err_i2c_driver_register:
-       mlxsw_core_driver_unregister(&mlxsw_minimal_driver);
+       mlxsw_core_driver_unregister(&mlxsw_m_driver);
 
        return err;
 }
 
-static void __exit mlxsw_minimal_module_exit(void)
+static void __exit mlxsw_m_module_exit(void)
 {
-       mlxsw_i2c_driver_unregister(&mlxsw_minimal_i2c_driver);
-       mlxsw_core_driver_unregister(&mlxsw_minimal_driver);
+       mlxsw_i2c_driver_unregister(&mlxsw_m_i2c_driver);
+       mlxsw_core_driver_unregister(&mlxsw_m_driver);
 }
 
-module_init(mlxsw_minimal_module_init);
-module_exit(mlxsw_minimal_module_exit);
+module_init(mlxsw_m_module_init);
+module_exit(mlxsw_m_module_exit);
 
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Vadim Pasternak <vadimp@mellanox.com>");
 MODULE_DESCRIPTION("Mellanox minimal driver");
-MODULE_DEVICE_TABLE(i2c, mlxsw_minimal_i2c_id);
+MODULE_DEVICE_TABLE(i2c, mlxsw_m_i2c_id);