Skip to content

Commit

Permalink
i2c: Simplify i2c_parent_is_i2c_adapter
Browse files Browse the repository at this point in the history
Only i2c devices can have their type set to i2c_adapter_type, so
testing the bus type is redundant.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Lawnick <ml.lawnick@gmx.de>
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 24, 2010
1 parent 3235844 commit d582963
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/linux/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
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;
}

Expand Down

0 comments on commit d582963

Please sign in to comment.