Skip to contentSkip to conversation

i2c: i2c-smbus: drop useless stubs

PATCH Applied Jean Delvare 3 participants 3 messages Jul 19, 2016 – Jul 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: i2c-smbus: drop useless stubs

Drivers which use the SMBus extensions select I2C_SMBUS, so the stubs are not needed.

Cc Benjamin Tissoires <[email protected]>
Cc Wolfram Sang <[email protected]>
---
 include/linux/i2c-smbus.h |   15 ---------------
 1 file changed, 15 deletions(-)
include/linux/i2c-smbus.h +0 -15
@@ -73,23 +73,8 @@ struct smbus_host_notify {
 	u8			addr;
 };
 
-#if IS_ENABLED(CONFIG_I2C_SMBUS)
 struct smbus_host_notify *i2c_setup_smbus_host_notify(struct i2c_adapter *adap);
 int i2c_handle_smbus_host_notify(struct smbus_host_notify *host_notify,
 				 unsigned short addr, unsigned int data);
-#else
-static inline struct smbus_host_notify *
-i2c_setup_smbus_host_notify(struct i2c_adapter *adap)
-{
-	return NULL;
-}
-
-static inline int
-i2c_handle_smbus_host_notify(struct smbus_host_notify *host_notify,
-			     unsigned short addr, unsigned int data)
-{
-	return 0;
-}
-#endif /* I2C_SMBUS */
 
 #endif /* _LINUX_I2C_SMBUS_H */
Signature · 2 lines
Jean Delvare
SUSE L3 Support
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jean Delvare

Drivers which use the SMBus extensions select I2C_SMBUS, so the stubs are not needed.

Cc Benjamin Tissoires <[email protected]>
Cc Wolfram Sang <[email protected]>

---

Cheers,
Benjamin

Quoted 34 lines
 include/linux/i2c-smbus.h |   15 ---------------
 1 file changed, 15 deletions(-)
include/linux/i2c-smbus.h +0 -15
@@ -73,23 +73,8 @@ struct smbus_host_notify {
 	u8			addr;
 };
 
-#if IS_ENABLED(CONFIG_I2C_SMBUS)
 struct smbus_host_notify *i2c_setup_smbus_host_notify(struct i2c_adapter *adap);
 int i2c_handle_smbus_host_notify(struct smbus_host_notify *host_notify,
 				 unsigned short addr, unsigned int data);
-#else
-static inline struct smbus_host_notify *
-i2c_setup_smbus_host_notify(struct i2c_adapter *adap)
-{
-	return NULL;
-}
-
-static inline int
-i2c_handle_smbus_host_notify(struct smbus_host_notify *host_notify,
-			     unsigned short addr, unsigned int data)
-{
-	return 0;
-}
-#endif /* I2C_SMBUS */
 
 #endif /* _LINUX_I2C_SMBUS_H */
Signature · 3 lines
-- 
Jean Delvare
SUSE L3 Support