i2c: don't expose function which is only used internally
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 10 Feb 2022 21:33:41 +0000 (22:33 +0100)
committerWolfram Sang <wsa@kernel.org>
Tue, 15 Feb 2022 08:58:57 +0000 (09:58 +0100)
i2c_setup_smbus_alert() is only needed within the I2C core, so no need
to expose it to other modules.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-smbus.c
drivers/i2c/i2c-core.h
include/linux/i2c-smbus.h

index 304c2c8fee68ef17ea2ad185791ef782d2ba9988..053b215308c441192e1f4f439484d1768b38fc7e 100644 (file)
@@ -716,5 +716,4 @@ int i2c_setup_smbus_alert(struct i2c_adapter *adapter)
 
        return PTR_ERR_OR_ZERO(i2c_new_smbus_alert_device(adapter, NULL));
 }
-EXPORT_SYMBOL_GPL(i2c_setup_smbus_alert);
 #endif
index 8ce261167a2d3d9d7f7a8f87979a79fe62351cd6..87e2c914f1c57ba8a6d98ceb1a22331cbea8e4c0 100644 (file)
@@ -86,3 +86,12 @@ void of_i2c_register_devices(struct i2c_adapter *adap);
 static inline void of_i2c_register_devices(struct i2c_adapter *adap) { }
 #endif
 extern struct notifier_block i2c_of_notifier;
+
+#if IS_ENABLED(CONFIG_I2C_SMBUS)
+int i2c_setup_smbus_alert(struct i2c_adapter *adap);
+#else
+static inline int i2c_setup_smbus_alert(struct i2c_adapter *adap)
+{
+       return 0;
+}
+#endif
index 95cf902e0bdae37e0dc229aa8a4bbffa96ee4bb8..ced1c6ead52a44735f59d6fe5702af9b20355787 100644 (file)
@@ -30,14 +30,6 @@ struct i2c_client *i2c_new_smbus_alert_device(struct i2c_adapter *adapter,
                                              struct i2c_smbus_alert_setup *setup);
 int i2c_handle_smbus_alert(struct i2c_client *ara);
 
-#if IS_ENABLED(CONFIG_I2C_SMBUS)
-int i2c_setup_smbus_alert(struct i2c_adapter *adap);
-#else
-static inline int i2c_setup_smbus_alert(struct i2c_adapter *adap)
-{
-       return 0;
-}
-#endif
 #if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_I2C_SLAVE)
 struct i2c_client *i2c_new_slave_host_notify_device(struct i2c_adapter *adapter);
 void i2c_free_slave_host_notify_device(struct i2c_client *client);