Skip to content

Commit fbc54ae

Browse files
andy-shevWolfram Sang
authored andcommitted
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 <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent c6250d0 commit fbc54ae

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

drivers/i2c/i2c-core-of.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ const struct of_device_id
157157

158158
return i2c_of_match_device_sysfs(matches, client);
159159
}
160-
EXPORT_SYMBOL_GPL(i2c_of_match_device);
161160

162161
#if IS_ENABLED(CONFIG_OF_DYNAMIC)
163162
static int of_i2c_notify(struct notifier_block *nb, unsigned long action,

drivers/i2c/i2c-core.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,17 @@ static inline void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter) {
8484

8585
#ifdef CONFIG_OF
8686
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+
8790
#else
8891
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+
}
8998
#endif
9099
extern struct notifier_block i2c_of_notifier;
91100

include/linux/i2c.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,10 +1029,6 @@ static inline struct i2c_adapter *of_get_i2c_adapter_by_node(struct device_node
10291029
return i2c_get_adapter_by_fwnode(of_fwnode_handle(node));
10301030
}
10311031

1032-
const struct of_device_id
1033-
*i2c_of_match_device(const struct of_device_id *matches,
1034-
struct i2c_client *client);
1035-
10361032
int of_i2c_get_board_info(struct device *dev, struct device_node *node,
10371033
struct i2c_board_info *info);
10381034

@@ -1053,13 +1049,6 @@ static inline struct i2c_adapter *of_get_i2c_adapter_by_node(struct device_node
10531049
return NULL;
10541050
}
10551051

1056-
static inline const struct of_device_id
1057-
*i2c_of_match_device(const struct of_device_id *matches,
1058-
struct i2c_client *client)
1059-
{
1060-
return NULL;
1061-
}
1062-
10631052
static inline int of_i2c_get_board_info(struct device *dev,
10641053
struct device_node *node,
10651054
struct i2c_board_info *info)

0 commit comments

Comments
 (0)