X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fi2c%2Falgos%2Fi2c-algo-pca.c;h=b88a6fcf7bd094abf75c67ba940cefe0fbd9ce58;hb=3f79e107f72e8efa86cd2f21356692b712713b5c;hp=beb10edfe9c1774c7426945962b749b9831c7c88;hpb=c7a46533ff7ef9e1c51bae6e54208527c5275b24;p=powerpc.git diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index beb10edfe9..b88a6fcf7b 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c @@ -34,7 +34,7 @@ #define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0) #define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0) -static int i2c_debug=0; +static int i2c_debug; #define pca_outw(adap, reg, val) adap->write_byte(adap, reg, val) #define pca_inw(adap, reg) adap->read_byte(adap, reg) @@ -374,10 +374,10 @@ int i2c_pca_add_bus(struct i2c_adapter *adap) adap->timeout = 100; /* default values, should */ adap->retries = 3; /* be replaced by defines */ - rval = pca_init(pca_adap); + if ((rval = pca_init(pca_adap))) + return rval; - if (!rval) - i2c_add_adapter(adap); + rval = i2c_add_adapter(adap); return rval; }