From patchwork Sat Jul 28 16:59:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 10548029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 619EB112E for ; Sat, 28 Jul 2018 16:59:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C62D2B228 for ; Sat, 28 Jul 2018 16:59:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 405302B239; Sat, 28 Jul 2018 16:59:44 +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 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 6523A2B228 for ; Sat, 28 Jul 2018 16:59:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729457AbeG1S0s (ORCPT ); Sat, 28 Jul 2018 14:26:48 -0400 Received: from mail.andi.de1.cc ([85.214.239.24]:39726 "EHLO h2641619.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729453AbeG1S0s (ORCPT ); Sat, 28 Jul 2018 14:26:48 -0400 Received: from p200300ccfbf73b001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:fbf7:3b00:1a3d:a2ff:febf:d33a] helo=aktux) by h2641619.stratoserver.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjSZ4-0001JI-Lv; Sat, 28 Jul 2018 18:59:34 +0200 Received: from andi by aktux with local (Exim 4.89) (envelope-from ) id 1fjSZ4-00049L-7I; Sat, 28 Jul 2018 18:59:34 +0200 From: Andreas Kemnade To: Thierry Reding , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, j-keerthy@ti.com, tony@atomide.com, linux-omap@vger.kernel.org Cc: Andreas Kemnade Subject: [PATCH] pwm: pwm-omap-dmtimer: fix probing problems by returning EPROBE_DEFER Date: Sat, 28 Jul 2018 18:59:14 +0200 Message-Id: <20180728165914.15871-1-andreas@kemnade.info> X-Mailer: git-send-email 2.11.0 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 I got this in the kernel log: [ 0.756042] omap-dmtimer-pwm dmtimer-pwm: dmtimer pdata structure NULL [ 0.756134] omap-dmtimer-pwm: probe of dmtimer-pwm failed with error -22 the probe function has to wait until omap_dm_timer_probe() in clocksource/timer-ti-dm.c has initialized pdata, so defer probing Fixes: b7290cf6ff78 (pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops) Signed-off-by: Andreas Kemnade --- drivers/pwm/pwm-omap-dmtimer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c index 665da3c8fbce..808835179c2e 100644 --- a/drivers/pwm/pwm-omap-dmtimer.c +++ b/drivers/pwm/pwm-omap-dmtimer.c @@ -264,8 +264,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; }