Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: Unexport i2c_of_match_device()

i2c_of_match_device() is not used anymore outside of I²C framework,
unexport it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

authored by

Andy Shevchenko and committed by
Wolfram Sang
fbc54ae4 c6250d0e

+9 -12
-1
drivers/i2c/i2c-core-of.c
··· 157 157 158 158 return i2c_of_match_device_sysfs(matches, client); 159 159 } 160 - EXPORT_SYMBOL_GPL(i2c_of_match_device); 161 160 162 161 #if IS_ENABLED(CONFIG_OF_DYNAMIC) 163 162 static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
+9
drivers/i2c/i2c-core.h
··· 84 84 85 85 #ifdef CONFIG_OF 86 86 void of_i2c_register_devices(struct i2c_adapter *adap); 87 + const struct of_device_id *i2c_of_match_device(const struct of_device_id *matches, 88 + struct i2c_client *client); 89 + 87 90 #else 88 91 static inline void of_i2c_register_devices(struct i2c_adapter *adap) { } 92 + static inline 93 + const struct of_device_id *i2c_of_match_device(const struct of_device_id *matches, 94 + struct i2c_client *client) 95 + { 96 + return NULL; 97 + } 89 98 #endif 90 99 extern struct notifier_block i2c_of_notifier; 91 100
-11
include/linux/i2c.h
··· 1029 1029 return i2c_get_adapter_by_fwnode(of_fwnode_handle(node)); 1030 1030 } 1031 1031 1032 - const struct of_device_id 1033 - *i2c_of_match_device(const struct of_device_id *matches, 1034 - struct i2c_client *client); 1035 - 1036 1032 int of_i2c_get_board_info(struct device *dev, struct device_node *node, 1037 1033 struct i2c_board_info *info); 1038 1034 ··· 1045 1049 } 1046 1050 1047 1051 static inline struct i2c_adapter *of_get_i2c_adapter_by_node(struct device_node *node) 1048 - { 1049 - return NULL; 1050 - } 1051 - 1052 - static inline const struct of_device_id 1053 - *i2c_of_match_device(const struct of_device_id *matches, 1054 - struct i2c_client *client) 1055 1052 { 1056 1053 return NULL; 1057 1054 }