Re: function to retrive of_device_id data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5 May 2015 at 00:24, Rob Herring <robherring2@xxxxxxxxx> wrote:
> On Sun, May 3, 2015 at 4:19 PM, Joachim Eastwood <manabian@xxxxxxxxx> wrote:
>> Hi DT maintainers,
>>
>> A common driver pattern for retrieving the data field in a of_device_id struct seems to be:
>>
>>     const struct of_device_id *match;
>>     match = of_match_device(driver_of_match, &pdev->dev);
>>     driver->data = match->data;
>>
>> I was looking for a simple function to perform the above action but couldn't find one.
>>
>> What do you think about the following patch to add such a function?
>
> Looks fine to me. I'd prefer it be called of_device_get_match_data() though.

I'll rename it and post a proper patch with a change log, tomorrow.

regards,
Joachim Eastwood
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux