linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: dmaengine@vger.kernel.org, timur@codeaurora.org,
	linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, robin.murphy@arm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 3/4] dmaengine: qcom_hidma: add support for the new revision
Date: Wed, 29 Nov 2017 19:28:14 +0530	[thread overview]
Message-ID: <20171129135813.GE32417@localhost> (raw)
In-Reply-To: <1510281175-27173-3-git-send-email-okaya@codeaurora.org>

On Thu, Nov 09, 2017 at 09:32:54PM -0500, Sinan Kaya wrote:

> -static bool hidma_msi_capable(struct device *dev)
> +static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
>  {
>  	struct acpi_device *adev = ACPI_COMPANION(dev);
> -	const char *of_compat;
> -	int ret = -EINVAL;
> +	enum hidma_cap cap;
>  
> -	if (!adev || acpi_disabled) {
> -		ret = device_property_read_string(dev, "compatible",
> -						  &of_compat);
> -		if (ret)
> -			return false;
> +	if (!adev || acpi_disabled)
> +		cap = (enum hidma_cap) of_device_get_match_data(dev);
> +	else
> +		cap = (enum hidma_cap) acpi_device_get_match_data(dev);

should this not reside in core? How about a device_get_match_data() which
returns the data for folks based on node being acpi/of

-- 
~Vinod

  reply	other threads:[~2017-11-29 13:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10  2:32 [PATCH V3 1/4] Documentation: DT: qcom_hidma: bump HW revision for the bugfixed HW Sinan Kaya
2017-11-10  2:32 ` [PATCH V3 2/4] ACPI / bus: introduce acpi_device_get_match_data() function Sinan Kaya
2017-11-10  2:35   ` Sinan Kaya
2017-11-12  0:14     ` Rafael J. Wysocki
2017-11-29 13:55       ` Vinod Koul
2017-11-29 20:49         ` Sinan Kaya
2017-11-10  2:32 ` [PATCH V3 3/4] dmaengine: qcom_hidma: add support for the new revision Sinan Kaya
2017-11-29 13:58   ` Vinod Koul [this message]
2017-11-29 22:14     ` Sinan Kaya
2017-11-10  2:32 ` [PATCH V3 4/4] dmaengine: qcom_hidma: add identity register support Sinan Kaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171129135813.GE32417@localhost \
    --to=vinod.koul@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=okaya@codeaurora.org \
    --cc=robin.murphy@arm.com \
    --cc=timur@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).