Commit 79530291 authored by Lourdes Pedrajas's avatar Lourdes Pedrajas Committed by Greg Kroah-Hartman

staging: gdm724x: use netdev_err() instead of pr_err()

use netdev_err() which is a message printing function specific for network
devices instead of pr_err(), in function netlink_send().
Signed-off-by: default avatarLourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200320003947.31726-1-lu@pplo.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04ff8b51
...@@ -513,7 +513,7 @@ static int gdm_lte_event_send(struct net_device *dev, char *buf, int len) ...@@ -513,7 +513,7 @@ static int gdm_lte_event_send(struct net_device *dev, char *buf, int len)
length = gdm_dev16_to_cpu(phy_dev->get_endian(phy_dev->priv_dev), length = gdm_dev16_to_cpu(phy_dev->get_endian(phy_dev->priv_dev),
hci->len) + HCI_HEADER_SIZE; hci->len) + HCI_HEADER_SIZE;
return netlink_send(lte_event.sock, idx, 0, buf, length); return netlink_send(lte_event.sock, idx, 0, buf, length, dev);
} }
static void gdm_lte_event_rcv(struct net_device *dev, u16 type, static void gdm_lte_event_rcv(struct net_device *dev, u16 type,
......
...@@ -89,7 +89,8 @@ struct sock *netlink_init(int unit, ...@@ -89,7 +89,8 @@ struct sock *netlink_init(int unit,
return sock; return sock;
} }
int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len,
struct net_device *dev)
{ {
static u32 seq; static u32 seq;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
...@@ -118,8 +119,8 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) ...@@ -118,8 +119,8 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
return len; return len;
if (ret != -ESRCH) if (ret != -ESRCH)
pr_err("nl broadcast g=%d, t=%d, l=%d, r=%d\n", netdev_err(dev, "nl broadcast g=%d, t=%d, l=%d, r=%d\n",
group, type, len, ret); group, type, len, ret);
else if (netlink_has_listeners(sock, group + 1)) else if (netlink_has_listeners(sock, group + 1))
return -EAGAIN; return -EAGAIN;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
struct sock *netlink_init(int unit, struct sock *netlink_init(int unit,
void (*cb)(struct net_device *dev, void (*cb)(struct net_device *dev,
u16 type, void *msg, int len)); u16 type, void *msg, int len));
int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len); int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len,
struct net_device *dev);
#endif /* _NETLINK_K_H_ */ #endif /* _NETLINK_K_H_ */
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