From patchwork Thu Dec 18 14:44:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5514271 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29D2EBEEA8 for ; Thu, 18 Dec 2014 14:45:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49D9920A25 for ; Thu, 18 Dec 2014 14:45:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BB3520A2B for ; Thu, 18 Dec 2014 14:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752321AbaLROoy (ORCPT ); Thu, 18 Dec 2014 09:44:54 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:57489 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752031AbaLROox (ORCPT ); Thu, 18 Dec 2014 09:44:53 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so1809089wib.5 for ; Thu, 18 Dec 2014 06:44:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=4uHeudvRt1Vr5nSEiEulF2VCxdegDfWXJGxnZs9HH/Y=; b=kYULZDImHE/9vzKi5ddM3Aa2TSj/1RPI5akdHm3+zjMk/oTLOMm5Wd5kdyzijn6+NC AHUJUlTXf6RJfAxpCQgeNZlN+d39vb7HRgVUbejP3xZa3FcxZg1Qwv6doj0lzw/eUIk0 YDGQ2alMT5TF5c8TvJPwYtPSY6YqhaCtMlRbh1IeoMRtE4FgT3imX6i4LDRM4ALPJHd7 AoKfPwa4skQ6owTAInxi1KseP+89O1aP4NRWFBKwc2PYq5UlsIpHMC7B3QN8kMjUn8pl UIJWNvnBPC+IgKMlhWZM2i66mrPJvletOwMM2ztfDSJnfaYfoQ9sh8SwH1TuGT9rv2Kf 7AxQ== X-Gm-Message-State: ALoCoQml09fdeirY/wIi5quAyAhywZ7G3hmiKTU5S3BADERY/3xRh/XS0nylpkpbxorqvzCviEAI X-Received: by 10.194.90.193 with SMTP id by1mr5421304wjb.12.1418913892569; Thu, 18 Dec 2014 06:44:52 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id a14sm25013698wib.22.2014.12.18.06.44.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Dec 2014 06:44:51 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Chris Ball Subject: [PATCH 5/7] mmc: slot-gpio: Make mmc_gpio_alloc() available for MMC core Date: Thu, 18 Dec 2014 15:44:34 +0100 Message-Id: <1418913876-13937-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418913876-13937-1-git-send-email-ulf.hansson@linaro.org> References: <1418913876-13937-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As a step in moving slot-gpio functions/structs closer to the MMC core, let's add a local header file for slot-gpio. In this initial step we move mmc_gpio_alloc() into the header file, to make it available for the MMC core. Following patches will show the utilization of it. Signed-off-by: Ulf Hansson --- drivers/mmc/core/slot-gpio.c | 4 +++- drivers/mmc/core/slot-gpio.h | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 drivers/mmc/core/slot-gpio.h diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c index f9a0c6e..ec918c2 100644 --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -18,6 +18,8 @@ #include #include +#include "slot-gpio.h" + struct mmc_gpio { struct gpio_desc *ro_gpio; struct gpio_desc *cd_gpio; @@ -38,7 +40,7 @@ static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id) return IRQ_HANDLED; } -static int mmc_gpio_alloc(struct mmc_host *host) +int mmc_gpio_alloc(struct mmc_host *host) { size_t len = strlen(dev_name(host->parent)) + 4; struct mmc_gpio *ctx; diff --git a/drivers/mmc/core/slot-gpio.h b/drivers/mmc/core/slot-gpio.h new file mode 100644 index 0000000..8c1854d --- /dev/null +++ b/drivers/mmc/core/slot-gpio.h @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2014 Linaro Ltd + * + * Author: Ulf Hansson + * + * License terms: GNU General Public License (GPL) version 2 + */ +#ifndef _MMC_CORE_SLOTGPIO_H +#define _MMC_CORE_SLOTGPIO_H + +int mmc_gpio_alloc(struct mmc_host *host); + +#endif