From patchwork Mon Sep 23 14:27:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2928221 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC4909F289 for ; Mon, 23 Sep 2013 14:32:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94D1F201F8 for ; Mon, 23 Sep 2013 14:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 547F92014B for ; Mon, 23 Sep 2013 14:32:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752823Ab3IWO16 (ORCPT ); Mon, 23 Sep 2013 10:27:58 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:63690 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700Ab3IWO1z (ORCPT ); Mon, 23 Sep 2013 10:27:55 -0400 Received: by mail-la0-f46.google.com with SMTP id eh20so2524559lab.5 for ; Mon, 23 Sep 2013 07:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2KinP7FQB7T4nkinHpFDaQIsIbbLUXKZnB1H/JlRZeE=; b=R58MbsZM2kEgn2DCyaNBoGbYqeoMVWQApufBs2T/MV1Y6nIUKwBVSIiDC18XmGEM4w 5jJ64KSCHijmwtH0/2xu+pv9VbuMaABosaZHQsT6P+GSHAVmGt9YvW/8QxOf90XgIV6z NTnL7ejNmxBW+pB3r2uiAjIXKlbZcyNESX4x+ZruFjGtbIBIdVELxxiAltCLx7hT6lqR 1dfPpFvcE3c0TKpVfwoYUoe0EyzzA3SnHDhnIYZ2HnbsYH7xh7G+EBvq8rg4eupgv7Dj V7rMmZUo8HLbsO8CvvuBd/qwU96SHTeiWojx941RgeLfJAc3IHic2XYOxpBhwFPrKbgv 45Ew== X-Received: by 10.152.26.72 with SMTP id j8mr20439399lag.19.1379946472167; Mon, 23 Sep 2013 07:27:52 -0700 (PDT) Received: from xi.terra (c193-14-141-227.cust.tele2.se. [193.14.141.227]) by mx.google.com with ESMTPSA id b1sm12862915lah.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Sep 2013 07:27:50 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.80.1) (envelope-from ) id 1VO775-0006gg-AK; Mon, 23 Sep 2013 16:27:47 +0200 From: Johan Hovold To: Greg Kroah-Hartman Cc: Grant Likely , Mark Brown , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pcmcia@lists.infradead.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, Johan Hovold , Nicolas Pitre , Chris Ball Subject: [PATCH 2/7] mmc: mvsdio: fix deferred probe from __init Date: Mon, 23 Sep 2013 16:27:27 +0200 Message-Id: <1379946452-25649-3-git-send-email-jhovold@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1379946452-25649-1-git-send-email-jhovold@gmail.com> References: <20130923134028.GF21013@sirena.org.uk> <1379946452-25649-1-git-send-email-jhovold@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 Move probe out of __init section and don't use platform_driver_probe which cannot be used with deferred probing. Since commit e9354576 ("gpiolib: Defer failed gpio requests by default") this driver might return -EPROBE_DEFER if the mmc_gpio_request_cd fails. Cc: Nicolas Pitre Cc: Chris Ball Signed-off-by: Johan Hovold --- drivers/mmc/host/mvsdio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 06c5b0b..deecee0 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -655,7 +655,7 @@ static const struct mmc_host_ops mvsd_ops = { .enable_sdio_irq = mvsd_enable_sdio_irq, }; -static void __init +static void mv_conf_mbus_windows(struct mvsd_host *host, const struct mbus_dram_target_info *dram) { @@ -677,7 +677,7 @@ mv_conf_mbus_windows(struct mvsd_host *host, } } -static int __init mvsd_probe(struct platform_device *pdev) +static int mvsd_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct mmc_host *mmc = NULL; @@ -819,7 +819,7 @@ out: return ret; } -static int __exit mvsd_remove(struct platform_device *pdev) +static int mvsd_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -872,7 +872,8 @@ static const struct of_device_id mvsdio_dt_ids[] = { MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); static struct platform_driver mvsd_driver = { - .remove = __exit_p(mvsd_remove), + .probe = mvsd_probe, + .remove = mvsd_remove, .suspend = mvsd_suspend, .resume = mvsd_resume, .driver = { @@ -881,7 +882,7 @@ static struct platform_driver mvsd_driver = { }, }; -module_platform_driver_probe(mvsd_driver, mvsd_probe); +module_platform_driver(mvsd_driver); /* maximum card clock frequency (default 50MHz) */ module_param(maxfreq, int, 0);