* [PATCH 1/2] i2c: Simplify i2c_parent_is_i2c_adapter
@ 2010-08-23 9:29 Jean Delvare
0 siblings, 0 replies; only message in thread
From: Jean Delvare @ 2010-08-23 9:29 UTC (permalink / raw)
To: Linux I2C; +Cc: Michael Lawnick
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-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Michael Lawnick <ml.lawnick-Mmb7MZpHnFY@public.gmane.org>
---
Michael, is this OK with you?
include/linux/i2c.h | 1 -
1 file changed, 1 deletion(-)
--- linux-2.6.36-rc0.orig/include/linux/i2c.h 2010-08-15 21:00:36.000000000 +0200
+++ linux-2.6.36-rc0/include/linux/i2c.h 2010-08-15 21:01:32.000000000 +0200
@@ -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;
}
--
Jean Delvare
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-23 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-23 9:29 [PATCH 1/2] i2c: Simplify i2c_parent_is_i2c_adapter Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).