From patchwork Tue Oct 22 16:32:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 3083901 Return-Path: X-Original-To: patchwork-linux-arm@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 613F89F2B7 for ; Tue, 22 Oct 2013 16:34:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C3F120498 for ; Tue, 22 Oct 2013 16:34:13 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F6012048E for ; Tue, 22 Oct 2013 16:34:08 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYeth-0001EQ-M6; Tue, 22 Oct 2013 16:33:33 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYetf-000823-7T; Tue, 22 Oct 2013 16:33:31 +0000 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYetc-00080e-Jc for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2013 16:33:29 +0000 Received: by mail-lb0-f181.google.com with SMTP id x18so4893371lbi.26 for ; Tue, 22 Oct 2013 09:33:06 -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=1uNruOCTTfGtPcxRCdLHFCSSy4ItgL4UYX1FBbGZEAw=; b=QrfXdDQv/O747LT+J8lI/ZLYMBONzEY2bGMrvr325IeH7CQ7Bwaw3dsLbBas6ZXFeh 2vSgDE8cWRQeFi6EnpwPjAApgsieRHpEYOvMzwl6HIsswC0ZltB5PPIrjtaiIFCu6XpL N62CSKXZT21jPiLXxGBdrusnx9DfzbAzlRkVuni5yJqVK567Jmoh1dSO6FtD8qFsfrGZ 8JosQ5ixAxVEwpShK7Kb/q/fV4De7HU6gItR3JVg2mloM6YYkSUltZjw7qyuu6gKcjKY nFdPnEEobSGhEnqcsF64lvHHdmNrCXS8nl5nXtQKfQcj7j00T+quMsY21/ktmv6pBlmg 6Vmw== X-Received: by 10.112.72.100 with SMTP id c4mr856879lbv.57.1382459586387; Tue, 22 Oct 2013 09:33:06 -0700 (PDT) Received: from xi.terra (c193-14-141-227.cust.tele2.se. [193.14.141.227]) by mx.google.com with ESMTPSA id ap7sm21760360lac.10.2013.10.22.09.33.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 22 Oct 2013 09:33:05 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.80.1) (envelope-from ) id 1VYetD-0006w4-E9; Tue, 22 Oct 2013 18:33:03 +0200 From: Johan Hovold To: Greg Kroah-Hartman Subject: [PATCH 2/2] misc: atmel_pwm: set initcall level to subsys Date: Tue, 22 Oct 2013 18:32:40 +0200 Message-Id: <1382459560-26596-3-git-send-email-jhovold@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1382459560-26596-1-git-send-email-jhovold@gmail.com> References: <1382459560-26596-1-git-send-email-jhovold@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131022_123328_832359_F4B9BC71 X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -2.0 (--) Cc: linux-arm-kernel@lists.infradead.org, Johan Hovold , Nicolas Ferre , linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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 Even with the atmel_pwm driver and the atmel-pwm-bl backlight driver supporting deferred probing, we still want to make sure that any pwm-device is available when the backlight devices are probed to avoid any unnecessary delays before enabling the backlight. Signed-off-by: Johan Hovold --- drivers/misc/atmel_pwm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c index a6dc56e..0d0f599 100644 --- a/drivers/misc/atmel_pwm.c +++ b/drivers/misc/atmel_pwm.c @@ -395,7 +395,17 @@ static struct platform_driver atmel_pwm_driver = { */ }; -module_platform_driver_probe(atmel_pwm_driver, pwm_probe); +static int __init pwm_init(void) +{ + return platform_driver_probe(&atmel_pwm_driver, pwm_probe); +} +subsys_initcall(pwm_init); + +static void __exit pwm_exit(void) +{ + platform_driver_unregister(&atmel_pwm_driver); +} +module_exit(pwm_exit); MODULE_DESCRIPTION("Driver for AT32/AT91 PWM module"); MODULE_LICENSE("GPL");