linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/6] i2c: acpi: Export i2c_acpi_find_client_by_adev() for users
@ 2021-05-26 12:43 Andy Shevchenko
  2021-05-26 12:43 ` [PATCH v1 2/6] staging: atomisp: Replace open-coded i2c_acpi_find_client_by_adev() Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Andy Shevchenko @ 2021-05-26 12:43 UTC (permalink / raw)
  To: Andy Shevchenko, Wolfram Sang, Hans de Goede,
	Mauro Carvalho Chehab, linux-i2c, linux-acpi, linux-kernel,
	linux-media, linux-staging
  Cc: Mika Westerberg, Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman

There is at least one user that will gain from the
i2c_acpi_find_client_by_adev() being exported.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/i2c-core-acpi.c | 3 ++-
 include/linux/i2c.h         | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 8ceaa88dd78f..5be37a5efcb4 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -387,7 +387,7 @@ struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
 }
 EXPORT_SYMBOL_GPL(i2c_acpi_find_adapter_by_handle);
 
-static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
+struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
 {
 	struct device *dev;
 	struct i2c_client *client;
@@ -402,6 +402,7 @@ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
 
 	return client;
 }
+EXPORT_SYMBOL_GPL(i2c_acpi_find_client_by_adev);
 
 static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
 			   void *arg)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index e8f2ac8c9c3d..335dc4f5abbb 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -995,6 +995,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
 
 #endif /* CONFIG_OF */
 
+struct acpi_device;
 struct acpi_resource;
 struct acpi_resource_i2c_serialbus;
 
@@ -1005,6 +1006,7 @@ u32 i2c_acpi_find_bus_speed(struct device *dev);
 struct i2c_client *i2c_acpi_new_device(struct device *dev, int index,
 				       struct i2c_board_info *info);
 struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle);
+struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev);
 #else
 static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
 					     struct acpi_resource_i2c_serialbus **i2c)
@@ -1024,6 +1026,10 @@ static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle ha
 {
 	return NULL;
 }
+static inline struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
+{
+	return NULL;
+}
 #endif /* CONFIG_ACPI */
 
 #endif /* _LINUX_I2C_H */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-07-22  9:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 12:43 [PATCH v1 1/6] i2c: acpi: Export i2c_acpi_find_client_by_adev() for users Andy Shevchenko
2021-05-26 12:43 ` [PATCH v1 2/6] staging: atomisp: Replace open-coded i2c_acpi_find_client_by_adev() Andy Shevchenko
2021-07-22  8:57   ` Mauro Carvalho Chehab
2021-07-22  9:02     ` Andy Shevchenko
2021-05-26 12:43 ` [PATCH v1 3/6] staging: atomisp: Remove unused declarations Andy Shevchenko
2021-05-26 12:43 ` [PATCH v1 4/6] staging: atomisp: Annotate a couple of definitions with __maybe_unused Andy Shevchenko
2021-05-26 12:43 ` [PATCH v1 5/6] staging: atomisp: Move MIPI_PORT_LANES to the only user Andy Shevchenko
2021-05-26 18:23   ` kernel test robot
2021-05-26 12:43 ` [PATCH v1 6/6] staging: atomisp: Remove unused port_enabled variable Andy Shevchenko
2021-05-27 20:26 ` [PATCH v1 1/6] i2c: acpi: Export i2c_acpi_find_client_by_adev() for users Wolfram Sang
2021-05-28  9:23   ` Andy Shevchenko
2021-05-28  9:25     ` Andy Shevchenko
2021-05-28  9:25   ` Greg Kroah-Hartman
2021-05-28  9:34     ` Andy Shevchenko
2021-05-28 10:01       ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).