ixgbe: extract PTP clock device from ptp_init
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 16 May 2014 05:12:27 +0000 (05:12 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 27 May 2014 06:53:10 +0000 (23:53 -0700)
commit63328ada9ec778315ea6dd91d82014288a7e3d43
tree1edc6d6ebc8bc8ed57e150d441b9a76e3ed228c2
parentd63214079fe844892e49786992b79eae00982ae2
ixgbe: extract PTP clock device from ptp_init

In order to properly handle a suspend/resume cycle, we cannot destroy
the PTP clock device. As part of this, we should only re-create the
device on first initialization. After a resume, when ixgbe_ptp_init is
called, we won't create a new clock, and we will use the old clock
device. To that end, this patch extracts the clock creation out of
ptp_init, and only calls it if we don't already have a ptp_clock
pointer.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c