Re: [PATCH v2 06/28] drivers: Add generic helper to match by of_node

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

 



Hi

On 14/06/2019 21:31, Wolfram Sang wrote:
+
+int device_match_of_node(struct device *dev, const void *np)
+{
+	return dev->of_node == np;
+}
+EXPORT_SYMBOL_GPL(device_match_of_node);

Is it an option to 'static inline' this simple function in the header,
saving the EXPORT?


No. This is supposed to be passed on as a call back function pointer
for the APIs. Having it as a static inline, would simply replicate
the same function through the driver subsystems, which is one of the
issues that series is trying to solve. Also, by having them exported,
we can convert the new specialized device lookup functions,
*_find_device_by_<property> to be static inlines.

Suzuki



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux