<br><br><div class="gmail_quote">2012/11/15 Thomas Petazzoni <span dir="ltr"><<a href="mailto:thomas.petazzoni@free-electrons.com" target="_blank">thomas.petazzoni@free-electrons.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Axel Lin,<br>
<div class="im"><br>
On Thu, 15 Nov 2012 12:51:36 +0800, Axel Lin wrote:<br>
> of_match_device() may return NULL.<br>
><br>
> Signed-off-by: Axel Lin <<a href="mailto:axel.lin@ingics.com">axel.lin@ingics.com</a>><br>
<br>
</div>Could you detail under what conditions of_match_device() may return<br>
NULL in the specific case of this driver? This of_match_device() call<br>
is using the same dove_pinctrl_of_match array that is used to ->probe()<br>
this driver. So I don't see how you can get into ->probe() without<br>
having a matching entry.<br>
<br>
Am I missing something?<br></blockquote><div><br> hi Thomas,<br>You are right.<br><br>I was thinking when the case CONFIG_OF is not selected,<br>of_match_ptr(dove_pinctrl_of_match) is NULL and of_match_device returns NULL.<br>
But this driver only works when CONFIG_OF is selected.<br><br>BTW, I found there is no way to compile the dove and kirkwood pinctrl drivers.<br>I need add below patch to compile these two drivers, how do you think about below patch?<br>
( In dove, the USE_OF is optional, it is selected only when MACH_DOVE_DT is enabled )<br><br>diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig<br>index 14f8160..dda6785 100644<br>--- a/arch/arm/Kconfig<br>+++ b/arch/arm/Kconfig<br>
@@ -531,6 +531,8 @@ config ARCH_DOVE<br> select CPU_V7<br> select GENERIC_CLOCKEVENTS<br> select MIGHT_HAVE_PCI<br>+ select PINCTRL<br>+ select PINCTRL_DOVE if USE_OF<br> select PLAT_ORION_LEGACY<br>
select USB_ARCH_HAS_EHCI<br> help<br>@@ -542,6 +544,8 @@ config ARCH_KIRKWOOD<br> select CPU_FEROCEON<br> select GENERIC_CLOCKEVENTS<br> select PCI<br>+ select PINCTRL<br>+ select PINCTRL_KIRKWOOD<br>
select PLAT_ORION_LEGACY<br> help<br> Support for the following Marvell Kirkwood series SoCs:<br><br>Regards,<br>Axel<br></div></div>