[PATCH v2 2/2] net: hisilicon: add hix5hd2 mac driver
From: zhangfei.gao@linaro.org (zhangfei)
Date: 2014-05-28 05:48:18
Also in:
linux-devicetree, netdev
From: zhangfei.gao@linaro.org (zhangfei)
Date: 2014-05-28 05:48:18
Also in:
linux-devicetree, netdev
On 05/27/2014 09:02 PM, Tobias Klauser wrote:
On 2014-05-27 at 14:44:27 +0200, Zhangfei Gao [off-list ref] wrote:quoted
+static struct net_device_stats *hix5hd2_net_get_stats(struct net_device *dev) +{ + return &dev->stats; +}This function can be omitted, since it corresponds to the default behavior if neither .ndo_get_stats or .ndo_get_stats64 is set.quoted
+ +static const struct net_device_ops hix5hd2_netdev_ops = { + .ndo_open = hix5hd2_net_open, + .ndo_stop = hix5hd2_net_close, + .ndo_start_xmit = hix5hd2_net_xmit, + .ndo_tx_timeout = hix5hd2_net_timeout, + .ndo_set_mac_address = hix5hd2_net_set_mac_address, + .ndo_get_stats = hix5hd2_net_get_stats,Thus the line above can then be omitted as well.
Thanks Tobias. Have double checked dev_get_stats, the .ndo_get_stats can be removed here. Thanks for the remainder.