From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753988AbdKFWJd (ORCPT ); Mon, 6 Nov 2017 17:09:33 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44304 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753845AbdKFWJb (ORCPT ); Mon, 6 Nov 2017 17:09:31 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 304CC60584 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision To: Robin Murphy , dmaengine@vger.kernel.org, timur@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1509989180-22617-1-git-send-email-okaya@codeaurora.org> <1509989180-22617-2-git-send-email-okaya@codeaurora.org> <428c7106-8ebe-0c12-4576-1cfac422923e@arm.com> <0b24eb03-1f0e-ec65-b12b-65036ef7addc@codeaurora.org> From: Sinan Kaya Message-ID: <1733d997-6f3a-459a-b14f-b29823c3a8af@codeaurora.org> Date: Mon, 6 Nov 2017 17:09:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <0b24eb03-1f0e-ec65-b12b-65036ef7addc@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/6/2017 1:15 PM, Sinan Kaya wrote: > On 11/6/2017 1:03 PM, Robin Murphy wrote: >>> #ifdef CONFIG_ACPI >>> ret = strcmp(acpi_device_hid(adev), "QCOM8062"); >>> + if (ret) >>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063"); >> This string-juggling looks to have already hit the point at which it >> doesn't scale well - it would be a lot nicer to make use of >> of_device_get_match_data() and the ACPI equivalent to abstract the >> version-specific data appropriately. > > Sure, let me do some research. > I just wanted to double check here. This is what I can do: 1. Maintain different match tables for different driver capabilities. 2. Instead of doing open-coded strcmp, I can do match against different tables using acpi_match_device/of_match_device. Hope this works for you. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.