From patchwork Thu Sep 11 07:50:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bai Ping X-Patchwork-Id: 4882701 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 BBCB89F32E for ; Thu, 11 Sep 2014 08:06:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C45C20148 for ; Thu, 11 Sep 2014 08:06:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 308B8201F2 for ; Thu, 11 Sep 2014 08:06:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752885AbaIKIGe (ORCPT ); Thu, 11 Sep 2014 04:06:34 -0400 Received: from mail-bn1bbn0103.outbound.protection.outlook.com ([157.56.111.103]:45701 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752145AbaIKIGb (ORCPT ); Thu, 11 Sep 2014 04:06:31 -0400 X-Greylist: delayed 900 seconds by postgrey-1.27 at vger.kernel.org; Thu, 11 Sep 2014 04:06:31 EDT Received: from BY2PR03CA070.namprd03.prod.outlook.com (10.141.249.43) by BLUPR03MB214.namprd03.prod.outlook.com (10.255.212.151) with Microsoft SMTP Server (TLS) id 15.0.1024.12; Thu, 11 Sep 2014 07:51:28 +0000 Received: from BN1BFFO11FD012.protection.gbl (2a01:111:f400:7c10::1:100) by BY2PR03CA070.outlook.office365.com (2a01:111:e400:2c5d::43) with Microsoft SMTP Server (TLS) id 15.0.1024.12 via Frontend Transport; Thu, 11 Sep 2014 07:51:27 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD012.mail.protection.outlook.com (10.58.144.75) with Microsoft SMTP Server (TLS) id 15.0.1019.14 via Frontend Transport; Thu, 11 Sep 2014 07:51:26 +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 s8B7pIY9024042; Thu, 11 Sep 2014 00:51:24 -0700 From: Bai Ping To: , CC: Subject: [PATCH] thermal: imx: correct thermal driver load sequence Date: Thu, 11 Sep 2014 15:50:54 +0800 Message-ID: <1410421854-30639-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)(50986999)(99396002)(36756003)(84676001)(6806004)(68736004)(19580405001)(44976005)(83322001)(19580395003)(50226001)(62966002)(85852003)(83072002)(89996001)(87936001)(21056001)(88136002)(93916002)(92726001)(92566001)(4396001)(76482001)(104016003)(46102001)(31966008)(74502001)(50466002)(74662001)(26826002)(85306004)(102836001)(107046002)(90102001)(106466001)(77156001)(104166001)(77982001)(79102001)(229853001)(33646002)(97736003)(105606002)(81342001)(87286001)(80022001)(64706001)(20776003)(95666004)(48376002)(47776003)(81542001)(2004002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB214; 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