X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-ibm_iic.c;h=87fae937e666dfdab0b8f00493a5afa94918e18c;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=bb885215c08d6c16dc103249ab41e5380947d9db;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index bb885215c..87fae937e 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -627,8 +627,6 @@ static u32 iic_func(struct i2c_adapter *adap) } static struct i2c_algorithm iic_algo = { - .name = "IBM IIC algorithm", - .id = I2C_ALGO_OCP, .master_xfer = iic_xfer, .functionality = iic_func }; @@ -674,13 +672,12 @@ static int __devinit iic_probe(struct ocp_device *ocp){ printk(KERN_WARNING"ibm-iic%d: missing additional data!\n", ocp->def->index); - if (!(dev = kmalloc(sizeof(*dev), GFP_KERNEL))){ + if (!(dev = kzalloc(sizeof(*dev), GFP_KERNEL))) { printk(KERN_CRIT "ibm-iic%d: failed to allocate device data\n", ocp->def->index); return -ENOMEM; } - memset(dev, 0, sizeof(*dev)); dev->idx = ocp->def->index; ocp_set_drvdata(ocp, dev); @@ -695,7 +692,7 @@ static int __devinit iic_probe(struct ocp_device *ocp){ dev->irq = iic_force_poll ? -1 : ocp->def->irq; if (dev->irq >= 0){ - /* Disable interrupts until we finish intialization, + /* Disable interrupts until we finish initialization, assumes level-sensitive IRQ setup... */ iic_interrupt_mode(dev, 0); @@ -727,7 +724,8 @@ static int __devinit iic_probe(struct ocp_device *ocp){ adap = &dev->adap; strcpy(adap->name, "IBM IIC"); i2c_set_adapdata(adap, dev); - adap->id = I2C_HW_OCP | iic_algo.id; + adap->id = I2C_HW_OCP; + adap->class = I2C_CLASS_HWMON; adap->algo = &iic_algo; adap->client_register = NULL; adap->client_unregister = NULL;