summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2023-06-07 19:57:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-17 16:10:49 +0300
commit41fe2205aae6625a2c0a5dcc8bde082bb4b1ac3c (patch)
tree39c41b534a199e7f9c632478925d0777ced3ee42 /include/linux
parent302bb15d87ad3056348c1e40dcc7292a23747040 (diff)
downloadlinux-41fe2205aae6625a2c0a5dcc8bde082bb4b1ac3c.tar.xz
i2c: Add i2c_get_match_data()
[ Upstream commit 564d73c4d9201526bd976b9379d2aaf1a7133e84 ] Add i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching, so that we can optimize the driver code. Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> [wsa: simplified var initialization] Signed-off-by: Wolfram Sang <wsa@kernel.org> Stable-dep-of: 119abf7d1815 ("hwmon: (max16065) Fix alarm attributes") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 2fb2f83bd501..8bcc0142c32c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -349,6 +349,8 @@ struct i2c_adapter *i2c_verify_adapter(struct device *dev);
const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id,
const struct i2c_client *client);
+const void *i2c_get_match_data(const struct i2c_client *client);
+
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
{
struct device * const dev = kobj_to_dev(kobj);