From patchwork Mon Jul 16 07:13:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10525619 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2C94560348 for ; Mon, 16 Jul 2018 07:13:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B2BF282EC for ; Mon, 16 Jul 2018 07:13:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F2A928A5B; Mon, 16 Jul 2018 07:13:46 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B27F7282EC for ; Mon, 16 Jul 2018 07:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6X3xngAAGgjngcGAdhoo/R9umpG292HD3XRC+iaLe4g=; b=cDAcH/TuigghJOMLmv6q0kpNZ j35KPBHUQQW9yMuoFjGHaJmjVs1MqDLHNlBrVGE3bLjCvySKKvIIapvMszRI/Weq0laHv9EoWXdtO Dxk6g09oTpob3fXVrAsMJjMNPGdDyHMpNvArSijtKoGL6mL+aZ+6jU/9ny/5CAkAdi20zmIfwOfBo 5/2MrX4QF2mZw1haFuQWakkNoZmGF76TQms27vzYgx0Ytnfis5NE9KZrjeu5aoUWM0lhwcsWpk8NE PQAL4i1MWKVKL2MhDG0aWOL03+zn3xlVf+ijXfjtaipm8mFjAVppS8O3LyzxWoJDWUZk5Rl1nyUdY 7McfPyVwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fexhV-0004uz-4A; Mon, 16 Jul 2018 07:13:41 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fexhR-0004th-Tj for linux-arm-kernel@lists.infradead.org; Mon, 16 Jul 2018 07:13:39 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id AD15880558; Mon, 16 Jul 2018 09:13:24 +0200 (CEST) Date: Mon, 16 Jul 2018 09:13:24 +0200 From: Pavel Machek To: Sebastian Reichel Subject: [PATCH] pwm-omap: handle timers not ready in probe Message-ID: <20180716071323.GB23110@amd> References: <20180709081534.GA6799@amd> <20180709214910.tes6u4ivxomd3aja@earth.universe> <20180709220211.GA7760@amd> <20180710101147.lyu65ro4czvrs2da@earth.universe> <20180710133040.GA4391@amd> <20180710161123.azym6sbboriuj4yc@earth.universe> <20180711080218.GA21225@amd> <20180711132739.GL99251@atomide.com> <20180711142526.dto6iost57zx5t5l@earth.universe> MIME-Version: 1.0 In-Reply-To: <20180711142526.dto6iost57zx5t5l@earth.universe> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180716_001338_114769_304C8A9B X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mpartap@gmx.net, Tony Lindgren , merlijn@wizzup.org, kernel list , nekit1000@gmail.com, linux-omap@vger.kernel.org, linux-arm-kernel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When all the drivers are built-in, timers are not ready and probing fails. Fix that with -EPROBE_DEFFER. Signed-off-by: Pavel Machek Acked-by: Pavel Machek Tested-by: Pavel Machek diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c index 665da3c..debeb70 100644 --- a/drivers/pwm/pwm-omap-dmtimer.c +++ b/drivers/pwm/pwm-omap-dmtimer.c @@ -265,7 +271,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev) timer_pdata = dev_get_platdata(&timer_pdev->dev); if (!timer_pdata) { dev_err(&pdev->dev, "dmtimer pdata structure NULL\n"); - ret = -EINVAL; + ret = -EPROBE_DEFER; goto put; }