From mboxrd@z Thu Jan 1 00:00:00 1970 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 BE5D8C4338F for ; Sun, 8 Aug 2021 18:23:55 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 014EF600CD for ; Sun, 8 Aug 2021 18:23:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 014EF600CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9702983221; Sun, 8 Aug 2021 20:22:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="E2yzQ/eB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F07182DA1; Sun, 8 Aug 2021 20:21:36 +0200 (CEST) Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3F0A182C8A for ; Sun, 8 Aug 2021 20:20:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32d.google.com with SMTP id c2-20020a0568303482b029048bcf4c6bd9so15332465otu.8 for ; Sun, 08 Aug 2021 11:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JWnuzC7+OLN5Sn+RWtr2gisZw/lfyyNqxUYX1/sTnEs=; b=E2yzQ/eB36xlYUtSRaW8VSPdPRqskSHqVLgx/aTe4mQFvVryiZkBfZFhCHagEBvn++ Kz+6wOQ7ft0FKAzwgMpNhNA6Hal6R5dq9sGOMx29/w+X9li4J2Yzr0XLI+FholLbsFGz AFGUi06PM8ENJJfy6xf59AV/aB0dCphOzL0YQ= 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:mime-version:content-transfer-encoding; bh=JWnuzC7+OLN5Sn+RWtr2gisZw/lfyyNqxUYX1/sTnEs=; b=idjfvkn51lXJKNloxykUFLJ1AjNi45w9SQzi3XD9U2VwZCQXMazj4uvH+lEs9hOxBP ezQRb6KMO/cgkIe7PPdKgAA1JAl578Ypg6w/kSU7GALSrP9hkJmMhB9lFrrA82czuIYF JRq9CWofMjuyB5eDgR52QpfZh480qMiG9Gip00XJJAC5yyKSCzYQE4qYKt1FU2oOPBAx yrx9Ifx7JEtP0E1zMvqfyM+Q0UTt03E2t60hKZeQn0geTjaOXtBXbMcg2DwRik8iQwxK PApilJmN6kqATOpqJh2CemgJ0lg90WPBDVIQYOyJTDg83na3EdWvBjRa0J70YjMPNV69 5/3w== X-Gm-Message-State: AOAM530VwSmUPIRtCCDX/uI3D3KzSX539Rh0u687rw41afdwgBZg2SXp CJQ7xKIgBYGcn1HsGUZpatwwpjPRri+P+wiF X-Google-Smtp-Source: ABdhPJypfk/TIBZPWAYfTLkzOWAolEUsMw/X945WKVXmx0w2hH1p2/l9GuRqALTqpoFxs2fpUQR56A== X-Received: by 2002:a05:6830:2144:: with SMTP id r4mr13934119otd.19.1628446855681; Sun, 08 Aug 2021 11:20:55 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id bc42sm2257147oob.39.2021.08.08.11.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Aug 2021 11:20:55 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Stephen Warren , Stephen Warren , Tom Warren Subject: [PATCH 15/23] tegra: gpio: Drop use of CONFIG_xxx variables Date: Sun, 8 Aug 2021 12:20:23 -0600 Message-Id: <20210808182031.3747270-16-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210808182031.3747270-1-sjg@chromium.org> References: <20210808182031.3747270-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean It is not a good idea to use things called CONFIG_xxx in the source code since this prefix is reserved for use by Kconfig. Rename these variables. Signed-off-by: Simon Glass --- drivers/gpio/tegra_gpio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index 5d3af8a016d..7f3a447f862 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -23,9 +23,9 @@ #include #include -static const int CONFIG_SFIO = 0; -static const int CONFIG_GPIO = 1; -static const int DIRECTION_INPUT = 0; +static const int CFG_SFIO; +static const int CFG_GPIO = 1; +static const int DIRECTION_INPUT; static const int DIRECTION_OUTPUT = 1; struct tegra_gpio_plat { @@ -54,7 +54,7 @@ static int get_config(unsigned gpio) debug("get_config: port = %d, bit = %d is %s\n", GPIO_FULLPORT(gpio), GPIO_BIT(gpio), type ? "GPIO" : "SFPIO"); - return type ? CONFIG_GPIO : CONFIG_SFIO; + return type ? CFG_GPIO : CFG_SFIO; } /* Config pin 'gpio' as GPIO or SFIO, based on 'type' */ @@ -68,7 +68,7 @@ static void set_config(unsigned gpio, int type) GPIO_FULLPORT(gpio), GPIO_BIT(gpio), type ? "GPIO" : "SFPIO"); u = readl(&bank->gpio_config[GPIO_PORT(gpio)]); - if (type != CONFIG_SFIO) + if (type != CFG_SFIO) u |= 1 << GPIO_BIT(gpio); else u &= ~(1 << GPIO_BIT(gpio)); @@ -216,7 +216,7 @@ void gpio_config_table(const struct tegra_gpio_config *config, int len) set_direction(config[i].gpio, DIRECTION_OUTPUT); break; } - set_config(config[i].gpio, CONFIG_GPIO); + set_config(config[i].gpio, CFG_GPIO); } } -- 2.32.0.605.g8dce9f2422-goog