fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / i2c / algos / i2c-algo-pcf.c
index 8d087da..ecb2c2d 100644 (file)
@@ -458,9 +458,7 @@ static u32 pcf_func(struct i2c_adapter *adap)
 
 /* -----exported algorithm data: ------------------------------------- */
 
-static struct i2c_algorithm pcf_algo = {
-       .name           = "PCF8584 algorithm",
-       .id             = I2C_ALGO_PCF,
+static const struct i2c_algorithm pcf_algo = {
        .master_xfer    = pcf_xfer,
        .functionality  = pcf_func,
 };
@@ -476,27 +474,19 @@ int i2c_pcf_add_bus(struct i2c_adapter *adap)
        DEB2(dev_dbg(&adap->dev, "hw routines registered.\n"));
 
        /* register new adapter to i2c module... */
-
-       adap->id |= pcf_algo.id;
        adap->algo = &pcf_algo;
 
        adap->timeout = 100;            /* default values, should       */
        adap->retries = 3;              /* be replaced by defines       */
 
-       rval = pcf_init_8584(pcf_adap);
-       if (!rval)
-               i2c_add_adapter(adap);
-       return rval;
-}
+       if ((rval = pcf_init_8584(pcf_adap)))
+               return rval;
 
+       rval = i2c_add_adapter(adap);
 
-int i2c_pcf_del_bus(struct i2c_adapter *adap)
-{
-       return i2c_del_adapter(adap);
+       return rval;
 }
-
 EXPORT_SYMBOL(i2c_pcf_add_bus);
-EXPORT_SYMBOL(i2c_pcf_del_bus);
 
 MODULE_AUTHOR("Hans Berglund <hb@spacetec.no>");
 MODULE_DESCRIPTION("I2C-Bus PCF8584 algorithm");