From patchwork Thu Sep 11 08:04:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bai Ping X-Patchwork-Id: 4883031 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@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 C07309F32E for ; Thu, 11 Sep 2014 08:20:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74D9C201F2 for ; Thu, 11 Sep 2014 08:20:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 355AC2022D for ; Thu, 11 Sep 2014 08:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbaIKIU1 (ORCPT ); Thu, 11 Sep 2014 04:20:27 -0400 Received: from mail-bn1bon0117.outbound.protection.outlook.com ([157.56.111.117]:26944 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751410AbaIKIUQ (ORCPT ); Thu, 11 Sep 2014 04:20:16 -0400 Received: from CH1PR03CA004.namprd03.prod.outlook.com (10.255.156.149) by BY2PR03MB221.namprd03.prod.outlook.com (10.242.36.145) with Microsoft SMTP Server (TLS) id 15.0.1024.12; Thu, 11 Sep 2014 08:04:45 +0000 Received: from BN1AFFO11FD008.protection.gbl (10.255.156.132) by CH1PR03CA004.outlook.office365.com (10.255.156.149) with Microsoft SMTP Server (TLS) id 15.0.1024.12 via Frontend Transport; Thu, 11 Sep 2014 08:04:44 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD008.mail.protection.outlook.com (10.58.52.68) with Microsoft SMTP Server (TLS) id 15.0.1019.14 via Frontend Transport; Thu, 11 Sep 2014 08:04:44 +0000 Received: from b51503-VirtualBox.ap.freescale.net (b51503-11.ap.freescale.net [10.193.99.93]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s8B84bAM030915; Thu, 11 Sep 2014 01:04:43 -0700 From: Bai Ping To: CC: Subject: [PATCH] thermal: imx: correct thermal driver load sequence Date: Thu, 11 Sep 2014 16:04:17 +0800 Message-ID: <1410422657-30726-1-git-send-email-b51503@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(33646002)(93916002)(107046002)(105606002)(85852003)(80022001)(99396002)(104016003)(85306004)(76482001)(106466001)(81342001)(229853001)(64706001)(47776003)(92566001)(84676001)(50986999)(31966008)(2351001)(74662001)(48376002)(79102001)(20776003)(97736003)(110136001)(81542001)(87936001)(68736004)(87286001)(88136002)(74502001)(50466002)(92726001)(89996001)(44976005)(77982001)(77156001)(102836001)(6806004)(19580405001)(83322001)(50226001)(4396001)(104166001)(26826002)(90102001)(21056001)(83072002)(19580395003)(95666004)(62966002)(46102001)(36756003)(2004002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB221; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 03319F6FEF Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Ping.Bai@freescale.com; X-OriginatorOrg: freescale.com Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Thermal driver should be registered after cpufreq driver have been registered and probed. Doing so is to make sure that thermal driver can get the max cpu cooling states correctly when calling get_property. Signed-off-by: Bai Ping --- drivers/thermal/imx_thermal.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 45af765..d00aaaf 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -1,5 +1,5 @@ /* - * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright 2013-2014 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -557,7 +557,14 @@ static struct platform_driver imx_thermal = { .probe = imx_thermal_probe, .remove = imx_thermal_remove, }; -module_platform_driver(imx_thermal); + +static int __init imx_thermal_init(void) +{ + return platform_driver_register(&imx_thermal); +} + +late_initcall(imx_thermal_init); + MODULE_AUTHOR("Freescale Semiconductor, Inc."); MODULE_DESCRIPTION("Thermal driver for Freescale i.MX SoCs"); -- 1.9.1