From patchwork Wed Mar 6 14:04:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 10841173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9883B922 for ; Wed, 6 Mar 2019 14:05:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85C8E2DB49 for ; Wed, 6 Mar 2019 14:05:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A8762DB62; Wed, 6 Mar 2019 14:05:10 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 29CF12DB49 for ; Wed, 6 Mar 2019 14:05:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727185AbfCFOFJ (ORCPT ); Wed, 6 Mar 2019 09:05:09 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:33352 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726993AbfCFOFJ (ORCPT ); Wed, 6 Mar 2019 09:05:09 -0500 Received: by mail-lf1-f68.google.com with SMTP id z23so9016677lfe.0 for ; Wed, 06 Mar 2019 06:05:08 -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=TgXa43oohEj4CgD4f1ipe2rPTFKtZ11pZj9jyv+WNJU=; b=yfeyCABWQXAnqLbK1AMf7nqZVzitr2qzhtKU3TMwoF0Oeqv/XuMh45nBoP0hhUtjmo es4W8SDXZ2BwghFz0UsEQ627e5mXgnseeq2u1g+higf242YfmeYhJ+Uxe9SKb6MMD1nO 3E0GM88spkT+Sl7NEdLaxNfjpwTrVObd4QkRr9P+fjvdgl6jXeTC+V83D158bR87WpFs SMT6SnP85L4gI512UbwCk1INot9d28ngKtU8XbfeDOpI8q0e5kL54Xl6L8ElnVYN7uyD 98ddd21dya2OvQUXA2xxqkD6xBchlnAh1qxjZW/b6HvbN3jd5aqmt9wT2cfhmbz+phrx jTcw== 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=TgXa43oohEj4CgD4f1ipe2rPTFKtZ11pZj9jyv+WNJU=; b=GQRZPcN/uAAGvg0UwObWucwvme8sbp3eenI3F+ISy/5CsNnFGL5T7i9WWoQsVi3wce sfjqOQSlCV1L599fUK33jcCtl2EERLSANH9Pa4T681YhxcB48SZnsuFKxsQCsUYLIaUF LeRrscKbw60V58hQ3k4f7EX6zagyDfCopgcBQibjccuMRuNDLKCxacT3XL4KpUzrKNOt tR66IWZTx6ZjfxbZMEdHTwHvgcSOPgOEKXWEx7AlE+Sx+5pGq318JNuArLIXQz9aIkhZ OUKWnqF1qh+jA+gyQV9VQ5WQRoGrPntsjXu80kLQzu978kRWHtHRZGDzieO/t/UKGk/f ZkKg== X-Gm-Message-State: APjAAAXXYZoYgz/YhAJ9PCp2MnkfU5APQpQhZVn0NAnNKuoLdt4xfecl zl9+plu9nQrDQYCoH/aixyOhpuQgKa4= X-Google-Smtp-Source: APXvYqwt8MRFJCHGmUU5Yk4G0Smkbt9hT4L068TyDR9NhjLldDXVIB7RA5cSxYRPTrtN5dM+SYqYoA== X-Received: by 2002:ac2:568f:: with SMTP id 15mr4050883lfr.94.1551881106857; Wed, 06 Mar 2019 06:05:06 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id o12sm343734ljc.37.2019.03.06.06.05.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 06:05:05 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ludovic Barre Cc: Russell King , Linus Walleij , Ulf Hansson Subject: [PATCH 5/6] mmc: mmci: Share sdmmc_variant_init() via the common header file Date: Wed, 6 Mar 2019 15:04:55 +0100 Message-Id: <20190306140456.28187-6-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190306140456.28187-1-ulf.hansson@linaro.org> References: <20190306140456.28187-1-ulf.hansson@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's good practice to share functions via header files, rather than from the c-files. Therefore, let's move sdmmc_variant_init() to mmci.h. Signed-off-by: Ulf Hansson Acked-by: Ludovic Barre Tested-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 6 ------ drivers/mmc/host/mmci.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index e11fc5019535..2f3a1a7bd465 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -52,12 +52,6 @@ void mmci_variant_init(struct mmci_host *host); static inline void mmci_variant_init(struct mmci_host *host) {} #endif -#ifdef CONFIG_MMC_STM32_SDMMC -void sdmmc_variant_init(struct mmci_host *host); -#else -static inline void sdmmc_variant_init(struct mmci_host *host) {} -#endif - static unsigned int fmax = 515633; static struct variant_data variant_arm = { diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index a76fe1085757..6bde28c9b302 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -447,3 +447,9 @@ void qcom_variant_init(struct mmci_host *host); #else static inline void qcom_variant_init(struct mmci_host *host) {} #endif + +#ifdef CONFIG_MMC_STM32_SDMMC +void sdmmc_variant_init(struct mmci_host *host); +#else +static inline void sdmmc_variant_init(struct mmci_host *host) {} +#endif