From: Jean Delvare Date: Sun, 24 Oct 2010 16:16:58 +0000 (+0200) Subject: i2c: Optimize function i2c_detect() X-Git-Tag: v2.6.37-rc1~143^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51b54ba9bb16b9fc28ec88006778d330af00bf8b;p=pandora-kernel.git i2c: Optimize function i2c_detect() Check the class flags before allocating the temporary i2c_client structure, to avoid allocating it when we don't need it. Also optimize the inner loop a bit. Signed-off-by: Jean Delvare Cc: Jacob Pan --- Reading git-diff-tree failed