lkml.org 
[lkml]   [2017]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision
From
Date
On 11/08/2017 10:58 AM, Sinan Kaya wrote:
> Besides, C compiler also won't let me put two arrays together like this.
>
> struct my_struct {
> struct some_struct array1[]
> struct some_struct array2[]
> }

Why not this:

const struct of_device_id hidma_msi_of_ids[] = {
{.compatible = "qcom,hidma-1.1",},
{.compatible = "qcom,hidma-1.2",},
{},
},

static const struct acpi_device_id hidma_msi_acpi_ids[] = {
{"QCOM8001", QDF2XXX_V1},
{"QCOM8002", QDF2XXX_V2},
{},
};

struct hidma_cap {
const struct of_device_id *of;
const struct acpi_device_id *acpi;
};

static struct hidma_cap hidma_msi_cap = {
hidma_msi_of_ids,
hidma_msi_acpi_ids
}

Keep in mind that you also need to add MODULE_DEVICE_TABLE entries,
which you can't really do with your approach.

MODULE_DEVICE_TABLE(of, hidma_msi_of_ids);
MODULE_DEVICE_TABLE(acpi, hidma_msi_acpi_ids);

--
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.

\
 
 \ /
  Last update: 2017-11-08 21:13    [W:0.038 / U:3.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site