ravb: Consolidate clock handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 12 Oct 2017 08:24:53 +0000 (10:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Oct 2017 06:00:50 +0000 (23:00 -0700)
commitab104615e01c2c4cbe9ea4073a430d51f6547dd2
treeac06d6152aa2e3f24b03076cce168874fd1ca140
parentc669b5cf42d0b066ced7ab70e7cf15e2155acb2c
ravb: Consolidate clock handling

The module clock is used for two purposes:
  - Wake-on-LAN (WoL), which is optional,
  - gPTP Timer Increment (GTI) configuration, which is mandatory.

As the clock is needed for GTI configuration anyway, WoL is always
available.  Hence remove duplication and repeated obtaining of the clock
by making GTI use the stored clock for WoL use.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb_main.c