Skip to content

Commit

Permalink
ethernet: amd: use pr_info_once()
Browse files Browse the repository at this point in the history
It will use pr_info_one() to print the version info of the
driver in probe function only once. No need to use the static
variable here.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Varka Bhadram authored and David S. Miller committed Sep 12, 2014
1 parent 2d8f7e2 commit e9c3f99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/ethernet/amd/au1000_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,6 @@ static const struct net_device_ops au1000_netdev_ops = {

static int au1000_probe(struct platform_device *pdev)
{
static unsigned version_printed;
struct au1000_private *aup = NULL;
struct au1000_eth_platform_data *pd;
struct net_device *dev = NULL;
Expand Down Expand Up @@ -1371,9 +1370,8 @@ static int au1000_probe(struct platform_device *pdev)

netdev_info(dev, "Au1xx0 Ethernet found at 0x%lx, irq %d\n",
(unsigned long)base->start, irq);
if (version_printed++ == 0)
pr_info("%s version %s %s\n",
DRV_NAME, DRV_VERSION, DRV_AUTHOR);

pr_info_once("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR);

return 0;

Expand Down

0 comments on commit e9c3f99

Please sign in to comment.