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