From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697AbdK2Nyp (ORCPT ); Wed, 29 Nov 2017 08:54:45 -0500 Received: from mga03.intel.com ([134.134.136.65]:5970 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbdK2Nym (ORCPT ); Wed, 29 Nov 2017 08:54:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,473,1505804400"; d="scan'208";a="181948288" Date: Wed, 29 Nov 2017 19:28:14 +0530 From: Vinod Koul To: Sinan Kaya 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 Message-ID: <20171129135813.GE32417@localhost> References: <1510281175-27173-1-git-send-email-okaya@codeaurora.org> <1510281175-27173-3-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1510281175-27173-3-git-send-email-okaya@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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