Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp258396imm; Wed, 4 Jul 2018 23:08:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfizEcA3JZA2OL7K5ORawPWLitiC8TENhJntie0hSw3QnsMQDKlgvbY/otYUjkA7QG7w2UK X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr4889687plu.22.1530770915922; Wed, 04 Jul 2018 23:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530770915; cv=none; d=google.com; s=arc-20160816; b=M8UF6lWV7znpLhVJXrqDBh9qEDunzS8Mjqx815C4cSCRhT8UFCQ3Ha9xO1ICfp7vj4 rwcWnQOffMIpSr1xoEGOqAVUOSq9GyWZNWpwHkczg0v60UdR770rXz+46R4yIewKxU7X FBnIMNJPkh9rhHWs2pooLQJmMnDaNkV2319ChfVtCl7SRcgireVoRhI3TbXLzqfuoBaA NvQb/wxJxwrFabHxfyup3SQIDTLVA+x3nQ6EqYROyYDJdju9EaJ5RctO+0GNpOPV+hF5 FcOXvB3WJDxHv6x2jQWrJ74hrzo26P7nrGJVQjUghwbfON8z9HNCjYB5JaQnX1EOTJdW fy2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=IYJrus4DEPzg2kOPmuTyghBhfsdZy6eYtwBt+a+qswg=; b=FocM1W8xYbdTP86ZBciKRVOBKIS3Kr8axYBUb4qSp+3kQhiOwO6VEQAmQxo9bU+z0R 7B9IkGcNiIwHLa6V5tt3E9IzzvMYiQjJRSzBXRqCiOPXLq5jcwj77NgZ/jrYsV4V/UUG TZ60x2knGk0RXqc7kYQJcNDcT1Suwmz3MFmNLGFjzQno0E7jDDxt9ETQRgGsAKgKOsyO p9DILbleBeAKcxzA0BVkdHkwQFjfVkZCW0da4ErRd2iCLnpBwAy9A54FmrKmtdZf8r1b aTTTzHWSWh2SrKFbQqFY4EdBdnOFvHSMZa7BB8YFY4uheF1a38/UFiTbj5JvqwvD58eM hoaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vRIK+M53; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9-v6si5024744pll.370.2018.07.04.23.08.20; Wed, 04 Jul 2018 23:08:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vRIK+M53; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbeGEGHn (ORCPT + 99 others); Thu, 5 Jul 2018 02:07:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:32826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbeGEGHl (ORCPT ); Thu, 5 Jul 2018 02:07:41 -0400 Received: from localhost (unknown [223.226.33.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9A05923F39; Thu, 5 Jul 2018 06:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530770861; bh=+nsstnDEPrJB7eXcKJSAkxUMGx3kBBm29Kat8Je+4MU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vRIK+M53zcwA/iFMfOhgrjQppdGitni5ZcGjFNq/XmPa3wgE/hSqvxOwjEUHSbxuk EGfQ+rqsf+pwokpIIPoXoCy00zDjMWq4QwC6xyKMGqqTPtaAQTOYc56+1FZbulkL94 9dUsFjUXyjBz+lbUHCMB8e659aqi5ZPhYISmRsp0= Date: Thu, 5 Jul 2018 11:37:33 +0530 From: Vinod To: Timur Tabi Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Matt Mackall , Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, Stephen Boyd , Timur Tabi Subject: Re: [PATCH v4 6/6] crypto: qcom: Add ACPI support Message-ID: <20180705060733.GH22377@vkoul-mobl> References: <20180704114427.29953-1-vkoul@kernel.org> <20180704114427.29953-7-vkoul@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04-07-18, 09:46, Timur Tabi wrote: > On 7/4/18 6:44 AM, Vinod Koul wrote: > > + if (has_acpi_companion(&pdev->dev)) { > > + rng->skip_init = 1; > > + } else { > > + rng->clk = devm_clk_get(&pdev->dev, "core"); > > + if (IS_ERR(rng->clk)) > > + return PTR_ERR(rng->clk); > > + > > + rng->skip_init = > > + (unsigned long)of_device_get_match_data(&pdev->dev); > > + } > > There is a device_get_match_data() function, if you want to be consistent > between ACPI and DT. Yes we can add driver data in ACPI ID as well so code can be: if (!has_acpi_companion(&pdev->dev)) { rng->clk = devm_clk_get(&pdev->dev, "core"); if (IS_ERR(rng->clk)) return PTR_ERR(rng->clk); } rng->skip_init = device_get_match_data(&pdev->dev); Looks much neater. I will wait for feedback on other patches before updating this. Meanwhile any word from testing on ACPI systems? Thanks -- ~Vinod