adm6996: the GPIO interface for the adm6996l does not support switch statistics.
This patch deactivates the statistics, adds a missing lock initialization and fixes a waring. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 41511
This commit is contained in:
parent
069e862ad5
commit
286ff7e322
1 changed files with 9 additions and 2 deletions
|
@ -804,7 +804,6 @@ adm6996_get_port_link(struct switch_dev *dev, int port,
|
||||||
struct adm6996_priv *priv = to_adm(dev);
|
struct adm6996_priv *priv = to_adm(dev);
|
||||||
|
|
||||||
u16 reg = 0;
|
u16 reg = 0;
|
||||||
u32 speed;
|
|
||||||
|
|
||||||
if (port >= ADM_NUM_PORTS)
|
if (port >= ADM_NUM_PORTS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -938,7 +937,7 @@ static struct switch_attr adm6996_vlan[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct switch_dev_ops adm6996_ops = {
|
static struct switch_dev_ops adm6996_ops = {
|
||||||
.attr_global = {
|
.attr_global = {
|
||||||
.attr = adm6996_globals,
|
.attr = adm6996_globals,
|
||||||
.n_attr = ARRAY_SIZE(adm6996_globals),
|
.n_attr = ARRAY_SIZE(adm6996_globals),
|
||||||
|
@ -992,6 +991,13 @@ static int adm6996_switch_init(struct adm6996_priv *priv, const char *alias, str
|
||||||
swdev->ops = &adm6996_ops;
|
swdev->ops = &adm6996_ops;
|
||||||
swdev->alias = alias;
|
swdev->alias = alias;
|
||||||
|
|
||||||
|
/* The ADM6996L connected through GPIOs does not support any switch
|
||||||
|
status calls */
|
||||||
|
if (priv->model == ADM6996L) {
|
||||||
|
adm6996_ops.attr_port.n_attr = 0;
|
||||||
|
adm6996_ops.get_port_link = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pr_info ("%s: %s model PHY found.\n", alias, swdev->name);
|
pr_info ("%s: %s model PHY found.\n", alias, swdev->name);
|
||||||
|
|
||||||
mutex_lock(&priv->reg_mutex);
|
mutex_lock(&priv->reg_mutex);
|
||||||
|
@ -1121,6 +1127,7 @@ static int adm6996_gpio_probe(struct platform_device *pdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
mutex_init(&priv->reg_mutex);
|
mutex_init(&priv->reg_mutex);
|
||||||
|
mutex_init(&priv->mib_lock);
|
||||||
|
|
||||||
priv->eecs = pdata->eecs;
|
priv->eecs = pdata->eecs;
|
||||||
priv->eedi = pdata->eedi;
|
priv->eedi = pdata->eedi;
|
||||||
|
|
Loading…
Reference in a new issue