Skip to contentSkip to conversation

i2c: Simplify i2c_parent_is_i2c_adapter

PATCH New Jean Delvare 1 participant 1 message Aug 23, 2010

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

PATCH 1/2 i2c: Simplify i2c_parent_is_i2c_adapter

Only i2c devices can have their type set to i2c_adapter_type, so testing the bus type is redundant.

Cc Michael Lawnick <[email protected]>

---
Michael, is this OK with you?

 include/linux/i2c.h |    1 -
 1 file changed, 1 deletion(-)
include/linux/i2c.h +0 -1
@@ -387,7 +387,6 @@ static inline void i2c_set_adapdata(stru
 static inline int i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter)
 {
 	return adapter->dev.parent != NULL
-		&& adapter->dev.parent->bus == &i2c_bus_type
 		&& adapter->dev.parent->type == &i2c_adapter_type;
 }
 
Signature · 1 line
Jean Delvare