aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/i2c-smbus.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2020-02-28 18:12:20 +0100
committerWolfram Sang <wsa@the-dreams.de>2020-03-10 12:19:52 +0100
commited680522268da2f6f2a67505dd144e718d726712 (patch)
treeb1ece58be4d20c46e21e8d0cd7d5b7f3e0744ed8 /include/linux/i2c-smbus.h
parenti2c: stm32f7: add a new st, stm32mp15-i2c compatible (diff)
downloadwireguard-linux-ed680522268da2f6f2a67505dd144e718d726712.tar.xz
wireguard-linux-ed680522268da2f6f2a67505dd144e718d726712.zip
i2c: convert SMBus alert setup function to return an ERRPTR
Only few drivers use this call, so drivers and I2C core are converted at once with this patch. By simply using i2c_new_client_device() instead of i2c_new_device(), we easily can return an ERRPTR for this function as well. To make out of tree users aware that something changed, the function is renamed to i2c_new_smbus_alert_device(). Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/linux/i2c-smbus.h')
-rw-r--r--include/linux/i2c-smbus.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h
index 585ad6fc3847..802aac0d2010 100644
--- a/include/linux/i2c-smbus.h
+++ b/include/linux/i2c-smbus.h
@@ -31,8 +31,8 @@ struct i2c_smbus_alert_setup {
int irq;
};
-struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter,
- struct i2c_smbus_alert_setup *setup);
+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) && IS_ENABLED(CONFIG_OF)