Received: by 10.223.185.116 with SMTP id b49csp2338198wrg; Mon, 5 Mar 2018 00:43:46 -0800 (PST) X-Google-Smtp-Source: AG47ELtSJ+Us9w/r4vycKAl67FYN11ta4Gv2aTW8sg4U7FzWtrklUpJIW4mGh6pqFcZP/DJZ6lpN X-Received: by 10.98.156.16 with SMTP id f16mr14703328pfe.180.1520239425865; Mon, 05 Mar 2018 00:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520239425; cv=none; d=google.com; s=arc-20160816; b=vUL7tSBzYP0z63fvhPfn79nJpzg5TdybjxCHySi34/wVPbXHiyeUPRfXQnig0MGMCH WmEjGgjymtDBeQdYsE4NbcvH0yn/NdOLU7moYfMoaGFkMUEjOJfJna8TisOUngR6LGZg JLHK8g/UlObJf0uWfs7wJeZKZd43lQnd+JBgSwF+IsecVlhlWnfDYRGJJpBfTz9ydiua VBcatXGZ39YmGymQ6BiJ1GPSNMXlBYUF3LcM7DS+m+lrAKuBJPki7Uh9JnCHJ65HnSBA CR9euUfOZ8yS3YTQg6t4uZ1fTXvnIy1REyJL+lrI/lrryu0+Cy23GZR/NyloZ8UJ7B2X ef7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=3Thva6RSRkTdHBOh5wf4OcSvVmY/jTHmwKHzsHsyLdo=; b=DGuvAUilP+zhgIgE8cmAmVeZtQ02FKCgaazWtn0z3hkBdSssqmzLPz8Cm8uyJqM9p6 McUzNyfJP0OeAijWNq+jnrBpuzWvQyzbI7knylrw/Sy6XAN4+SxnjUpkeroR7W0IK9E8 GCoNIjx9qxppTkqT1EPXy17Z8KMRAjYOo82L241keouVRwxZ03Op+QRteTJX53i6Yy/Y iEUM9grtYbCW6HlqK28li2RzvucufZvQE2bJVJ8MDgJVzxCWVlJTyCYeJ6ToVMbJsRo6 CKAZO8x5kF875WDcrH5DNNi6hPzPzUNLcEsAx9wRyUqWAbv/muObSqgp5hfMMMI5aPeZ 934w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tii2PzKn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7-v6si5475857plk.627.2018.03.05.00.43.30; Mon, 05 Mar 2018 00:43:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tii2PzKn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933219AbeCEHuN (ORCPT + 99 others); Mon, 5 Mar 2018 02:50:13 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37668 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933171AbeCEHuI (ORCPT ); Mon, 5 Mar 2018 02:50:08 -0500 Received: by mail-pg0-f68.google.com with SMTP id y26so6517931pgv.4; Sun, 04 Mar 2018 23:50:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3Thva6RSRkTdHBOh5wf4OcSvVmY/jTHmwKHzsHsyLdo=; b=tii2PzKnJ4wt71fJw4NHmAKbBs+v6mVQEtYpVifeG2u9fSCgfCdYMq74pBHkWDNFW1 1tLEXKF8qFCDNifQGBKpue4k9LMOE/2aUOMxXkZyJpkSlzuBb7c1ovQs5+RdhNrO4Dio G2SVARHW9mj/yX9aqI9bBf+3HHvkPG9qIDtDAxHZw6JmWa3BLTS4w3tzkLvImQxzJSWE fRapAhpZ2pWRtSEn7rjhYV1yJMMmEFQ6f4/N6TKn/J+wlQmovc7qlzu1g0qq95IRNuYJ hF65/g4Bi0BYwzn2EdzZynENim9GekGcAiv4kvk9husvIPm8unSnFsbOi6HxbgmB6KOo 8Hvg== 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=3Thva6RSRkTdHBOh5wf4OcSvVmY/jTHmwKHzsHsyLdo=; b=RKRKxSx3lXbeGn9CDLPEfS0mf24u1Kbz2GfCqwDkc3ZIJRqgafCRXpcFgEXV/RdbjZ 5ynkN2IVTtrOy9CTg646XP0G3TKYq3TMMq2v7vKQtz4LPM/rCyZLlcw2f32sjo8+Qy4/ TAkXeV9Cy6ZO3uDqHgDjTraZZfr6onuLk82Uswf1/rGcFnMoEf6Eav3DLnvjCz7wPHSD A0kLBjwJAyPQ7EBrYboEkg2tdLml9LlvJxnmCvVQF5ZHKQTsYQXPF2V6hFx+wObgPWqk bvPcIA3JdcJJO7AlGWODXXDANkS9289bftaRHqlequ51V/BIAckQunC349VjKMpL6LyJ nPCA== X-Gm-Message-State: APf1xPDbeQriDt6ATKrUKUcqnf8F1GbenVNXOiuD3gb3D+E2VvjbrQpF vt98kBVAfBpoHGRtWIN2FsQ= X-Received: by 10.98.32.200 with SMTP id m69mr14469201pfj.82.1520236208227; Sun, 04 Mar 2018 23:50:08 -0800 (PST) Received: from localhost.localdomain ([103.46.193.14]) by smtp.gmail.com with ESMTPSA id 125sm21674256pff.114.2018.03.04.23.50.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Mar 2018 23:50:07 -0800 (PST) From: Himanshu Jha To: jic23@kernel.org Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com, Himanshu Jha Subject: [PATCH 04/11] Staging: iio: accel: Rename few macro definitions Date: Mon, 5 Mar 2018 13:19:23 +0530 Message-Id: <1520236170-14668-5-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520236170-14668-1-git-send-email-himanshujha199640@gmail.com> References: <1520236170-14668-1-git-send-email-himanshujha199640@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename few macros with appropriate names specifying their usage/function. Signed-off-by: Himanshu Jha --- drivers/staging/iio/accel/adis16201.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c index 59c1166..445cb56 100644 --- a/drivers/staging/iio/accel/adis16201.c +++ b/drivers/staging/iio/accel/adis16201.c @@ -20,9 +20,8 @@ #include #include -#define ADIS16201_STARTUP_DELAY 220 - -#define ADIS16201_FLASH_CNT 0x00 +#define ADIS16201_STARTUP_DELAY_MS 220 +#define ADIS16201_FLASH_CNT 0x00 /* Data Output Register Information */ #define ADIS16201_SUPPLY_OUT 0x02 @@ -69,7 +68,7 @@ #define ADIS16201_MSC_CTRL_DATA_RDY_EN BIT(2) -#define ADIS16201_MSC_CTRL_ACTIVE_HIGH BIT(1) +#define ADIS16201_MSC_CTRL_ACTIVE_DATA_RDY_HIGH BIT(1) #define ADIS16201_MSC_CTRL_DATA_RDY_DIO1 BIT(0) @@ -80,14 +79,14 @@ #define ADIS16201_DIAG_STAT_SPI_FAIL_BIT 3 -#define ADIS16201_DIAG_STAT_FLASH_UPT_BIT 2 +#define ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT 2 #define ADIS16201_DIAG_STAT_POWER_HIGH_BIT 1 #define ADIS16201_DIAG_STAT_POWER_LOW_BIT 0 #define ADIS16201_GLOB_CMD_SW_RESET BIT(7) -#define ADIS16201_GLOB_CMD_FACTORY_CAL BIT(1) +#define ADIS16201_GLOB_CMD_FACTORY BIT(1) #define ADIS16201_ERROR_ACTIVE BIT(14) @@ -231,7 +230,7 @@ static const struct iio_info adis16201_info = { static const char * const adis16201_status_error_msgs[] = { [ADIS16201_DIAG_STAT_SPI_FAIL_BIT] = "SPI failure", - [ADIS16201_DIAG_STAT_FLASH_UPT_BIT] = "Flash update failed", + [ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT] = "Flash update failed", [ADIS16201_DIAG_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V", [ADIS16201_DIAG_STAT_POWER_LOW_BIT] = "Power supply below 3.15V", }; @@ -244,11 +243,11 @@ static const struct adis_data adis16201_data = { .self_test_mask = ADIS16201_MSC_CTRL_SELF_TEST_EN, .self_test_no_autoclear = true, - .startup_delay = ADIS16201_STARTUP_DELAY, + .startup_delay = ADIS16201_STARTUP_DELAY_MS, .status_error_msgs = adis16201_status_error_msgs, .status_error_mask = BIT(ADIS16201_DIAG_STAT_SPI_FAIL_BIT) | - BIT(ADIS16201_DIAG_STAT_FLASH_UPT_BIT) | + BIT(ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT) | BIT(ADIS16201_DIAG_STAT_POWER_HIGH_BIT) | BIT(ADIS16201_DIAG_STAT_POWER_LOW_BIT), }; -- 2.7.4