forked from Minki/linux
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: Lourdes Pedrajas <lu@pplo.net> Link: https://lore.kernel.org/r/20200320003947.31726-1-lu@pplo.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
04ff8b51ae
commit
7953029183
@ -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),
|
||||
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,
|
||||
|
@ -89,7 +89,8 @@ struct sock *netlink_init(int unit,
|
||||
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;
|
||||
struct sk_buff *skb = NULL;
|
||||
@ -118,8 +119,8 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
|
||||
return len;
|
||||
|
||||
if (ret != -ESRCH)
|
||||
pr_err("nl broadcast g=%d, t=%d, l=%d, r=%d\n",
|
||||
group, type, len, ret);
|
||||
netdev_err(dev, "nl broadcast g=%d, t=%d, l=%d, r=%d\n",
|
||||
group, type, len, ret);
|
||||
else if (netlink_has_listeners(sock, group + 1))
|
||||
return -EAGAIN;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
struct sock *netlink_init(int unit,
|
||||
void (*cb)(struct net_device *dev,
|
||||
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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user