From patchwork Sat Mar 21 21:39:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 453048 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 685991400DD for ; Sun, 22 Mar 2015 08:42:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=sICFFZCC; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752460AbbCUVmY (ORCPT ); Sat, 21 Mar 2015 17:42:24 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38725 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbbCUVki (ORCPT ); Sat, 21 Mar 2015 17:40:38 -0400 Received: by wibgn9 with SMTP id gn9so21911350wib.1; Sat, 21 Mar 2015 14:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4YTure3jH1oVGlb+c2ZBMLqRmEJJCi71ZTue7OAOfC4=; b=sICFFZCCavT+1Li2Zl22iGZFMUPg4ZyUlo+Lmnt/p3mmIEsBVuL8G+rv27edjGFly5 JZFEns0/QOTkX2XaFP2DyHmNKEsWYuNq0h4+MGfV5P/qv4c+bOCidWgEJFYifgYtGLmF MOJA+ViKHGAYcP9mRZUmPgDb3dqUwqXBr64R+JkaWPBZeFhaU7MT4R7XsqkvWCrvzSlb aQzTQe1yP4TYftwXQUjWvITfebxYr9EUY7mtXkZIHXrth0VN7IrT6MbnIPZfD2pW/+wE rFZhOT9phcV4RVx0/yl4ViOC/aic68hf0JDM/VNyxwMJ6+TOW+UE49Ha5EX/qgBa0h83 Cv7g== X-Received: by 10.194.122.232 with SMTP id lv8mr165286269wjb.146.1426974037360; Sat, 21 Mar 2015 14:40:37 -0700 (PDT) Received: from hoboy.home (194-96-185-227.adsl.highway.telekom.at. [194.96.185.227]) by mx.google.com with ESMTPSA id k6sm4047198wia.6.2015.03.21.14.40.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Mar 2015 14:40:36 -0700 (PDT) From: Richard Cochran To: Cc: , Amir Vadai , Ariel Elior , Arnd Bergmann , Baolin Wang , Ben Hutchings , Bruce Allan , Carolyn Wyborny , Chris Metcalf , David Miller , Frank Li , Giuseppe Cavallaro , Jeff Kirsher , John Stultz , Luwei Zhou , Matthew Vick , Michael Chan , Prashant Sreedharan , Shradha Shah , Solarflare linux maintainers , Sonic Zhang , =?UTF-8?q?Stefan=20S=C3=B8rensen?= , Thomas Gleixner , Tom Lendacky Subject: [PATCH net-next V2 21/23] ptp: ixp46x: convert to the 64 bit get/set time methods. Date: Sat, 21 Mar 2015 22:39:39 +0100 Message-Id: <288503105e9ec9f6023bb6c231fbb5db2d42d406.1426973658.git.richardcochran@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The device has a 64 bit clock register, where each clock tick is 16 nanoseconds, and so with this patch the driver is ready for the year 2038. Signed-off-by: Richard Cochran --- drivers/ptp/ptp_ixp46x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ptp/ptp_ixp46x.c b/drivers/ptp/ptp_ixp46x.c index 604d340..934c139 100644 --- a/drivers/ptp/ptp_ixp46x.c +++ b/drivers/ptp/ptp_ixp46x.c @@ -175,7 +175,7 @@ static int ptp_ixp_adjtime(struct ptp_clock_info *ptp, s64 delta) return 0; } -static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) +static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) { u64 ns; u32 remainder; @@ -195,7 +195,7 @@ static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) } static int ptp_ixp_settime(struct ptp_clock_info *ptp, - const struct timespec *ts) + const struct timespec64 *ts) { u64 ns; unsigned long flags; @@ -248,8 +248,8 @@ static struct ptp_clock_info ptp_ixp_caps = { .pps = 0, .adjfreq = ptp_ixp_adjfreq, .adjtime = ptp_ixp_adjtime, - .gettime = ptp_ixp_gettime, - .settime = ptp_ixp_settime, + .gettime64 = ptp_ixp_gettime, + .settime64 = ptp_ixp_settime, .enable = ptp_ixp_enable, };