Commit f6c9322c authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net/caifcaif_dev.c: Use netdev_<level>

Convert pr_<level>("%s" ..., (struct netdev *)->name ...)
to netdev_<level>((struct netdev *), ...)
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b31fa5ba
...@@ -216,7 +216,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, ...@@ -216,7 +216,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
switch (what) { switch (what) {
case NETDEV_REGISTER: case NETDEV_REGISTER:
pr_info("register %s\n", dev->name); netdev_info(dev, "register\n");
caifd = caif_device_alloc(dev); caifd = caif_device_alloc(dev);
if (caifd == NULL) if (caifd == NULL)
break; break;
...@@ -227,13 +227,13 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, ...@@ -227,13 +227,13 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
break; break;
case NETDEV_UP: case NETDEV_UP:
pr_info("up %s\n", dev->name); netdev_info(dev, "up\n");
caifd = caif_get(dev); caifd = caif_get(dev);
if (caifd == NULL) if (caifd == NULL)
break; break;
caifdev = netdev_priv(dev); caifdev = netdev_priv(dev);
if (atomic_read(&caifd->state) == NETDEV_UP) { if (atomic_read(&caifd->state) == NETDEV_UP) {
pr_info("%s already up\n", dev->name); netdev_info(dev, "already up\n");
break; break;
} }
atomic_set(&caifd->state, what); atomic_set(&caifd->state, what);
...@@ -274,7 +274,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, ...@@ -274,7 +274,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
caifd = caif_get(dev); caifd = caif_get(dev);
if (caifd == NULL) if (caifd == NULL)
break; break;
pr_info("going down %s\n", dev->name); netdev_info(dev, "going down\n");
if (atomic_read(&caifd->state) == NETDEV_GOING_DOWN || if (atomic_read(&caifd->state) == NETDEV_GOING_DOWN ||
atomic_read(&caifd->state) == NETDEV_DOWN) atomic_read(&caifd->state) == NETDEV_DOWN)
...@@ -296,10 +296,10 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, ...@@ -296,10 +296,10 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
caifd = caif_get(dev); caifd = caif_get(dev);
if (caifd == NULL) if (caifd == NULL)
break; break;
pr_info("down %s\n", dev->name); netdev_info(dev, "down\n");
if (atomic_read(&caifd->in_use)) if (atomic_read(&caifd->in_use))
pr_warn("Unregistering an active CAIF device: %s\n", netdev_warn(dev,
dev->name); "Unregistering an active CAIF device\n");
cfcnfg_del_phy_layer(get_caif_conf(), &caifd->layer); cfcnfg_del_phy_layer(get_caif_conf(), &caifd->layer);
dev_put(dev); dev_put(dev);
atomic_set(&caifd->state, what); atomic_set(&caifd->state, what);
...@@ -307,7 +307,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, ...@@ -307,7 +307,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
case NETDEV_UNREGISTER: case NETDEV_UNREGISTER:
caifd = caif_get(dev); caifd = caif_get(dev);
pr_info("unregister %s\n", dev->name); netdev_info(dev, "unregister\n");
atomic_set(&caifd->state, what); atomic_set(&caifd->state, what);
caif_device_destroy(dev); caif_device_destroy(dev);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment