From patchwork Fri Sep 1 23:52:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 9935389 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 338EC6016C for ; Fri, 1 Sep 2017 23:52:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B7952852B for ; Fri, 1 Sep 2017 23:52:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E4612853F; Fri, 1 Sep 2017 23:52:50 +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=-1.7 required=2.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM autolearn=no 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 AA08F2852B for ; Fri, 1 Sep 2017 23:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752475AbdIAXws (ORCPT ); Fri, 1 Sep 2017 19:52:48 -0400 Received: from regular1.263xmail.com ([211.150.99.137]:52950 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752451AbdIAXwr (ORCPT ); Fri, 1 Sep 2017 19:52:47 -0400 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.158]) by regular1.263xmail.com (Postfix) with ESMTP id 1BDE1DA96; Sat, 2 Sep 2017 07:52:42 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id B016D359; Sat, 2 Sep 2017 07:52:39 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <70081ffff7b8f83ff9073c87bef4af51> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 29494D7DK24; Sat, 02 Sep 2017 07:52:42 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org, dbasehore@chromium.org Cc: briannorris@chromium.org, dianders@chromium.org, Jeffy Chen , Chanwoo Choi , Kyungmin Park , MyungJoo Ham , linux-pm@vger.kernel.org Subject: [PATCH] CHROMIUM: devfreq: rk3399: Clear edev->dev drvdata before enabling dfi Date: Sat, 2 Sep 2017 07:52:37 +0800 Message-Id: <20170901235237.18390-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently we are using edev->dev drvdata to get rk3399-dmc data, but it would be inited to edev in devfreq_event_add_edev. So we need to clear the edev->dev drvdata before enabling dfi, to prevent dfi from getting the wrong rk3399-dmc data when the irq triggered too early. Signed-off-by: Jeffy Chen --- drivers/devfreq/rk3399_dmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index 1b89ebbad02c..12f9f03f349f 100644 --- a/drivers/devfreq/rk3399_dmc.c +++ b/drivers/devfreq/rk3399_dmc.c @@ -429,6 +429,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev) rk3399_devfreq_dmc_profile.initial_freq = data->rate; + platform_set_drvdata(pdev, NULL); data->devfreq = devm_devfreq_add_device(dev, &rk3399_devfreq_dmc_profile, "simple_ondemand",