From patchwork Wed Feb 24 14:42:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 12102061 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA43C433DB for ; Wed, 24 Feb 2021 15:46:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB9A064ED3 for ; Wed, 24 Feb 2021 15:46:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236066AbhBXPqM (ORCPT ); Wed, 24 Feb 2021 10:46:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235783AbhBXOqm (ORCPT ); Wed, 24 Feb 2021 09:46:42 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1547C061794 for ; Wed, 24 Feb 2021 06:42:38 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id c7so2126482wru.8 for ; Wed, 24 Feb 2021 06:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RlLY69dl0FNKKcCh7g/+fwlPd3uLKJlhP5Zykbo8eos=; b=mPYPZVu/FfUNUfxpNy7RV3MqNsdIWmrMQYP8/qAU8NR0URMVo7rV/JNEYEpXp9v1X8 EpRvph7XIQGY2L56Q/ouJ3UbI09/HlGmhzxVEXpjZur9VVbpXaZszc8gWsQZtllzQS+k LoMdCAGpXKpjAe30zFN6pD/YdMxTJ9oRzEp61cmHfRx51M+M7GrZVmhQSAFA/wi2tjQB NotVbXtcnDwdQBHUrVKkgjo8QHAFG1AmG0sYTeDoebk9N+4ZhQPxcfjzQU4EB85lYVi7 I0hsnfMNRHdtX2DJNyuICQjF4+AwdmZVr8NLj1moHdpr3EE3QJ/quccOfqj8BwvImcza NVyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RlLY69dl0FNKKcCh7g/+fwlPd3uLKJlhP5Zykbo8eos=; b=tomPr/AzdW0HVe3A3jP+KcMtJRQtMNvrxA7LO0GeBR3Zgo80xCp7f8A96+7BPGtKEl aAu243U/OijOyDr7Pt2tu7f6hUr8E3IgKhqwpoKbLfPCmjI+BAqRJ8GLQN9gD7pB6UAr jIVvG5ialzNVXx8ZWhcc4GNOcurOBEGExG29DHhSFRKcvjpFjiqQOOLgH6Jww4JK1Fbf d79YpJGUgjccGqWDuF7hsKo1ppNGmMvvJc96ZB6/tcHt2DkwrpoM54urVWXFXe8ohWut Mshyini7+KUi+fo+q4uLa/Bvb0UwTo2pk5HMHeb9tXHRED1+hBA9LonkXD4FCRQBxb0q XEWg== X-Gm-Message-State: AOAM532bZRELwWhlU5iJI2inH7KtGCmCENOMvgz9tQ2YqY7rhxPXXxqI /pUBrFnxptacXyH4gohgPrSFlCTQh0at7Q== X-Google-Smtp-Source: ABdhPJwcXbOVFQ7pcprfedminlYKezPtRgM8WYzRegU/uPGj0NJQ8H65qUeZOEh+uRBtDy+jVjsO7g== X-Received: by 2002:a5d:63d2:: with SMTP id c18mr529839wrw.277.1614177757504; Wed, 24 Feb 2021 06:42:37 -0800 (PST) Received: from localhost.localdomain (lns-bzn-59-82-252-157-252.adsl.proxad.net. [82.252.157.252]) by smtp.gmail.com with ESMTPSA id p3sm4170669wro.55.2021.02.24.06.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 06:42:37 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org, andriy.shevchenko@linux.intel.com Cc: linux-kernel@vger.kernel.org, Christian Eggers , Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org (open list:AMS AS73211 DRIVER) Subject: [PATCH v2 4/9] iio/drivers/as73211: Use HZ macros Date: Wed, 24 Feb 2021 15:42:14 +0100 Message-Id: <20210224144222.23762-4-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210224144222.23762-1-daniel.lezcano@linaro.org> References: <20210224144222.23762-1-daniel.lezcano@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org HZ unit conversion macros are available in units.h, use them and remove the duplicate definition. Signed-off-by: Daniel Lezcano Reviewed-by: Christian Eggers Acked-by: Jonathan Cameron --- drivers/iio/light/as73211.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c index 7b32dfaee9b3..3ba2378df3dd 100644 --- a/drivers/iio/light/as73211.c +++ b/drivers/iio/light/as73211.c @@ -24,8 +24,7 @@ #include #include #include - -#define HZ_PER_KHZ 1000 +#include #define AS73211_DRV_NAME "as73211" From patchwork Wed Feb 24 14:42:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 12102059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF344C433DB for ; Wed, 24 Feb 2021 15:46:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B86564ED3 for ; Wed, 24 Feb 2021 15:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232913AbhBXPp6 (ORCPT ); Wed, 24 Feb 2021 10:45:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235717AbhBXOqm (ORCPT ); Wed, 24 Feb 2021 09:46:42 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE194C0617A9 for ; Wed, 24 Feb 2021 06:42:43 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id v15so2135837wrx.4 for ; Wed, 24 Feb 2021 06:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HokQBU/ghtYugnhNg9omsYh8OE2+9P/WNHGHi5BtboA=; b=EFfGqrAUxLxs7rxfUGLf3i6T0VC0f+RwiaqLbB/jSzDZBUoP4NqhOPE15LATWpYsWu wyCdt8bFHnke7XVmgeJGm+xmNPRt6umRxgbeH2ROMIi40CWAaPeGQQbCUUy32P4uPMuR 69K5T1+51WIuUOHX4zeD9uZ/R6SjJcgAVQJ5OAqN88SNJDE++cYVRfLmEWV1QLhzhsA5 OjYpdcQngjNlMagS3tPN8FBtVMJFFCQAm4DWEmbx2CWy72bBEJ2WACe/5GiyHxrjfcJH RbAV5FfcJMuFoImHof3PGbkGfXTow6vgLF9inyz0MySlJngEZp2AUyODX6PH4V/cqsD3 yV2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HokQBU/ghtYugnhNg9omsYh8OE2+9P/WNHGHi5BtboA=; b=UxTBf+b0b6ip+lFjSA8PLD7/OPYdf0GiZZcvcZP9d1o6k3zaNYOWaoirOPZEKm2RO5 //Cc3gMR+GufVEHixv6UmEvbyka3QUuRFrvV/6n0m+h5fEubhMPWSvfhiYJ0oxJnQGNe sBglFJIuCtO0zOI/rdy/x0lUxYx7gwD/q48jfUKyHXdHdkUr7eGatQNt09oOdsQGPDtN OOc2f/bdlNiaC49GAX7Gl+ysz15Q+bB0QRG5loge2r2oilas7riaGR1nGIjKapEqEdGd OsAUiW2UjgVXpYmcW24UbWVP+OQPMPXtYtTUpiZKGMma6woCX8Q+FzGAgodf6aiaMWNL YWQw== X-Gm-Message-State: AOAM53312R2ULEWs4rRaBBQDm3DeFDKhkqqEvO1vUuJnLXopfam8N/MF oI5+XWvEyPaC1Wtqtm6/YpkiTQ== X-Google-Smtp-Source: ABdhPJxeswn6KrlSUcAY2vMoNAOfRftd8Gvei+4zong6S8ryra1+kdYb1YpVaIJ1rIGpAYoBHuhx1w== X-Received: by 2002:adf:f6cd:: with SMTP id y13mr11491952wrp.309.1614177762464; Wed, 24 Feb 2021 06:42:42 -0800 (PST) Received: from localhost.localdomain (lns-bzn-59-82-252-157-252.adsl.proxad.net. [82.252.157.252]) by smtp.gmail.com with ESMTPSA id p3sm4170669wro.55.2021.02.24.06.42.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 06:42:41 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org, andriy.shevchenko@linux.intel.com Cc: linux-kernel@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS) Subject: [PATCH v2 6/9] iio/drivers/hid-sensor: Use HZ macros Date: Wed, 24 Feb 2021 15:42:16 +0100 Message-Id: <20210224144222.23762-6-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210224144222.23762-1-daniel.lezcano@linaro.org> References: <20210224144222.23762-1-daniel.lezcano@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org HZ unit conversion macros are available in units.h, use them and remove the duplicate definition. Signed-off-by: Daniel Lezcano Acked-by: Jonathan Cameron --- drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c index 442ff787f7af..dda3b67e494f 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c @@ -11,13 +11,12 @@ #include #include #include +#include #include #include #include -#define HZ_PER_MHZ 1000000L - static struct { u32 usage_id; int unit; /* 0 for default others from HID sensor spec */