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: 10525611 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 00FA060348 for ; Mon, 16 Jul 2018 07:13:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7B68282EC for ; Mon, 16 Jul 2018 07:13:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA3982885F; Mon, 16 Jul 2018 07:13:27 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,T_TVD_MIME_EPI 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 77F61282EC for ; Mon, 16 Jul 2018 07:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728122AbeGPHjX (ORCPT ); Mon, 16 Jul 2018 03:39:23 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:60150 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbeGPHjX (ORCPT ); Mon, 16 Jul 2018 03:39:23 -0400 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 Cc: Tony Lindgren , kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org 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 Content-Disposition: inline In-Reply-To: <20180711142526.dto6iost57zx5t5l@earth.universe> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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; }