]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i2c: Unexport i2c_of_match_device()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 13 Feb 2025 11:45:05 +0000 (13:45 +0200)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 13 Feb 2025 15:47:52 +0000 (16:47 +0100)
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>
drivers/i2c/i2c-core-of.c
drivers/i2c/i2c-core.h
include/linux/i2c.h

index a6c407d3680098272a341de84269ef036e302279..02feee6c9ba96d986cb2ede827babb5db6aa00f2 100644 (file)
@@ -157,7 +157,6 @@ const struct of_device_id
 
        return i2c_of_match_device_sysfs(matches, client);
 }
-EXPORT_SYMBOL_GPL(i2c_of_match_device);
 
 #if IS_ENABLED(CONFIG_OF_DYNAMIC)
 static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
index 36587f38dff3d299b7411702446b5cfacac78599..4797ba88331c4b56dfbca1411cf3ca4d66eace2c 100644 (file)
@@ -84,8 +84,17 @@ static inline void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter) {
 
 #ifdef CONFIG_OF
 void of_i2c_register_devices(struct i2c_adapter *adap);
+const struct of_device_id *i2c_of_match_device(const struct of_device_id *matches,
+                                              struct i2c_client *client);
+
 #else
 static inline void of_i2c_register_devices(struct i2c_adapter *adap) { }
+static inline
+const struct of_device_id *i2c_of_match_device(const struct of_device_id *matches,
+                                              struct i2c_client *client)
+{
+       return NULL;
+}
 #endif
 extern struct notifier_block i2c_of_notifier;
 
index 2b2af24d2a436e80548e35f597a64569e3c24ff9..997e80649889165494a6f3d5db5a0eb7147211e3 100644 (file)
@@ -1029,10 +1029,6 @@ static inline struct i2c_adapter *of_get_i2c_adapter_by_node(struct device_node
        return i2c_get_adapter_by_fwnode(of_fwnode_handle(node));
 }
 
-const struct of_device_id
-*i2c_of_match_device(const struct of_device_id *matches,
-                    struct i2c_client *client);
-
 int of_i2c_get_board_info(struct device *dev, struct device_node *node,
                          struct i2c_board_info *info);
 
@@ -1053,13 +1049,6 @@ static inline struct i2c_adapter *of_get_i2c_adapter_by_node(struct device_node
        return NULL;
 }
 
-static inline const struct of_device_id
-*i2c_of_match_device(const struct of_device_id *matches,
-                    struct i2c_client *client)
-{
-       return NULL;
-}
-
 static inline int of_i2c_get_board_info(struct device *dev,
                                        struct device_node *node,
                                        struct i2c_board_info *info)