Thread (7 messages) 7 messages, 3 authors, 2017-11-08

[PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision

From: Vinod Koul <hidden>
Date: 2017-11-08 05:44:48
Also in: linux-arm-msm, lkml

On Mon, Nov 06, 2017 at 05:09:29PM -0500, Sinan Kaya wrote:
On 11/6/2017 1:15 PM, Sinan Kaya wrote:
quoted
On 11/6/2017 1:03 PM, Robin Murphy wrote:
quoted
quoted
 #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.
Sounds better to me. You should have common match where capabilities are
same.

-- 
~Vinod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help