From patchwork Tue Mar 20 08:33:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Yushchenko X-Patchwork-Id: 10296649 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 1DC25602B3 for ; Tue, 20 Mar 2018 08:33:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EBAF28681 for ; Tue, 20 Mar 2018 08:33:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 027132940F; Tue, 20 Mar 2018 08:33:41 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 93B6728681 for ; Tue, 20 Mar 2018 08:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751781AbeCTIdl (ORCPT ); Tue, 20 Mar 2018 04:33:41 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35248 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbeCTIdk (ORCPT ); Tue, 20 Mar 2018 04:33:40 -0400 Received: by mail-lf0-f66.google.com with SMTP id t132-v6so1208570lfe.2 for ; Tue, 20 Mar 2018 01:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=2ejglyQ2hmVzVO7mejaZBxoOUJn62uVMjhJQ0cB1f4I=; b=Y5P1flFDufuKnfzjpPmFy8HL/ofS6eRUzkWj9DtAkBFmuRZzW/rD8wJz2CjtQ9k6u2 E/YlnPAJXuomJcnvHQ7epg6Nt31yaET0wV23rVzrIalGJ/dOVvLbutNoWECa6AG8Ofmh 3JOrF8ujj5I1Wqtu7S7P2S6d0gkH1/+rQSlAYKwfeGg3vRjIRsFjet3WLCVa2ZBI7roN 1f4CDhmh0QYbjh3wISFkQuqnl6FeCC5byGc/Lb1Yhfc86zItH6ElPcSRT0+Et2drnSYW LJ0nH+rkxmn03ISjjERcbeQiu5gYP03gd8oXmu9XSxnLqWM+KXaBTdiHuw8roVIDvS9K 1iBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2ejglyQ2hmVzVO7mejaZBxoOUJn62uVMjhJQ0cB1f4I=; b=WjT3sBVcnqLrMKini7dFG+3kxcAiNDDbmNJhZ3dqi9XvvtnKnWenkAiulRiHehoQnH vSMKurC2h9IT2nVPu2AF6nHDwnEJUopCeQ/aHe+oBIgLS6MuceoBUUWiLPKSZobWGpEA y5jxnu1wUS0o3bQh4qxGDkBZAs9a2UNxj9myjVcdpoguRpdwmefNeJHryHMIohQXAqmH g3BhfgVIk8EEGwPu9V7dgLYuc6WxdiDtZNMsSKoj+NUpDMZntkaTfV3s+LGMjMgZmL5w guVrVw/ffGFvnOCwuHqWvAGXyyRZZVB5blez6Aohw3/TETjinNkzXMXjjgFLsU2CWW3H GnRA== X-Gm-Message-State: AElRT7HCzMnBmtnCNXquLJuhBNFgB68L8yJNVsUPVPjYlOlAnH8IQLO1 x2Dzd5c4EvJFBPWkUla+PoX7mA== X-Google-Smtp-Source: AG47ELuH91Rp3dSjghlu/z5XBfUXd5pJAV/647sNQI+GZe14inqwc+a48QZOzHUeeNjLrc5ng61e+Q== X-Received: by 2002:a19:3bc6:: with SMTP id d67-v6mr10588580lfl.100.1521534818586; Tue, 20 Mar 2018 01:33:38 -0700 (PDT) Received: from cobook.home (nikaet.starlink.ru. [94.141.168.29]) by smtp.gmail.com with ESMTPSA id e8-v6sm289521lfc.88.2018.03.20.01.33.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 01:33:37 -0700 (PDT) From: Nikita Yushchenko To: Michael Turquette , Stephen Boyd , Kuninori Morimoto , Gaku Inami Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Nikita Yushchenko Subject: [PATCH] clk: cs2000: set pm_ops in hibernate-compatible way Date: Tue, 20 Mar 2018 11:33:23 +0300 Message-Id: <20180320083323.23289-1-nikita.yoush@cogentembedded.com> X-Mailer: git-send-email 2.11.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use SET_LATE_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .resume_early field. This fixes initialization of CS2000 in restore from hibernation in case of kernel used to load image did not initialize CS2000 while kernel being restored had CS2000 initialized. Signed-off-by: Nikita Yushchenko --- drivers/clk/clk-cs2000-cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c index e8ea81c30f0c..c58019750b7e 100644 --- a/drivers/clk/clk-cs2000-cp.c +++ b/drivers/clk/clk-cs2000-cp.c @@ -549,7 +549,7 @@ static int cs2000_resume(struct device *dev) } static const struct dev_pm_ops cs2000_pm_ops = { - .resume_early = cs2000_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(NULL, cs2000_resume) }; static struct i2c_driver cs2000_driver = {