From patchwork Sun Sep 9 03:00:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 1427431 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 39EED3FC85 for ; Sun, 9 Sep 2012 03:00:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085Ab2IIDAN (ORCPT ); Sat, 8 Sep 2012 23:00:13 -0400 Received: from void.printf.net ([89.145.121.20]:39827 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725Ab2IIDAN (ORCPT ); Sat, 8 Sep 2012 23:00:13 -0400 Received: from c-76-24-28-220.hsd1.ma.comcast.net ([76.24.28.220] helo=octavius.laptop.org) by void.printf.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1TAXkj-0001jR-Dm; Sun, 09 Sep 2012 04:00:05 +0100 From: Chris Ball To: linux-mmc@vger.kernel.org Cc: Guennadi Liakhovetski Subject: [PATCH] mmc: slot-gpio: Fix missing assignment to ctx->ro_gpio Date: Sat, 08 Sep 2012 23:00:01 -0400 Message-ID: <87pq5vzyry.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org mmc_gpio_request_ro() doesn't store the requested gpio in ctx->ro_gpio. As a result, subsequent calls to mmc_gpio_get_ro() will always fail with -ENOSYS because the gpio number isn't available to that function. Cc: stable Signed-off-by: Chris Ball --- drivers/mmc/core/slot-gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c index 0582429..4f9b366 100644 --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -99,6 +99,7 @@ int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio) return ret; ctx = host->slot.handler_priv; + ctx->ro_gpio = gpio; return gpio_request_one(gpio, GPIOF_DIR_IN, ctx->ro_label); }