From patchwork Fri Feb 17 03:09:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 9578679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24AF06043A for ; Fri, 17 Feb 2017 03:09:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14A1828681 for ; Fri, 17 Feb 2017 03:09:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07C942868C; Fri, 17 Feb 2017 03:09:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47F8A28681 for ; Fri, 17 Feb 2017 03:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755290AbdBQDJW (ORCPT ); Thu, 16 Feb 2017 22:09:22 -0500 Received: from ozlabs.org ([103.22.144.67]:40837 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755277AbdBQDJW (ORCPT ); Thu, 16 Feb 2017 22:09:22 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 3vPdKR3Cv4z9s8B; Fri, 17 Feb 2017 14:09:15 +1100 (AEDT) From: Michael Ellerman To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] input/joystick/analog: Use get_cycles() on PPC Date: Fri, 17 Feb 2017 14:09:08 +1100 Message-Id: <1487300948-16665-1-git-send-email-mpe@ellerman.id.au> X-Mailer: git-send-email 2.7.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The analog joystick driver spits a warning at us: drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. PPC has get_cycles() so use that. Signed-off-by: Michael Ellerman --- drivers/input/joystick/analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 3d8ff09eba57..06962b63f3a6 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -163,7 +163,7 @@ static unsigned int get_time_pit(void) #define GET_TIME(x) do { x = (unsigned int)rdtsc(); } while (0) #define DELTA(x,y) ((y)-(x)) #define TIME_NAME "TSC" -#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE) +#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE) || defined(CONFIG_PPC) #define GET_TIME(x) do { x = get_cycles(); } while (0) #define DELTA(x,y) ((y)-(x)) #define TIME_NAME "get_cycles"