projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee13...
[powerpc.git]
/
drivers
/
i2c
/
busses
/
i2c-ibm_iic.c
diff --git
a/drivers/i2c/busses/i2c-ibm_iic.c
b/drivers/i2c/busses/i2c-ibm_iic.c
index
a3ed959
..
5bccb5d
100644
(file)
--- a/
drivers/i2c/busses/i2c-ibm_iic.c
+++ b/
drivers/i2c/busses/i2c-ibm_iic.c
@@
-28,7
+28,6
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
@@
-626,7
+625,7
@@
static u32 iic_func(struct i2c_adapter *adap)
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
}
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
}
-static struct i2c_algorithm iic_algo = {
+static
const
struct i2c_algorithm iic_algo = {
.master_xfer = iic_xfer,
.functionality = iic_func
};
.master_xfer = iic_xfer,
.functionality = iic_func
};
@@
-672,13
+671,12
@@
static int __devinit iic_probe(struct ocp_device *ocp){
printk(KERN_WARNING"ibm-iic%d: missing additional data!\n",
ocp->def->index);
printk(KERN_WARNING"ibm-iic%d: missing additional data!\n",
ocp->def->index);
- if (!(dev = k
malloc(sizeof(*dev), GFP_KERNEL)))
{
+ if (!(dev = k
zalloc(sizeof(*dev), GFP_KERNEL)))
{
printk(KERN_CRIT "ibm-iic%d: failed to allocate device data\n",
ocp->def->index);
return -ENOMEM;
}
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);
dev->idx = ocp->def->index;
ocp_set_drvdata(ocp, dev);
@@
-726,6
+724,7
@@
static int __devinit iic_probe(struct ocp_device *ocp){
strcpy(adap->name, "IBM IIC");
i2c_set_adapdata(adap, dev);
adap->id = I2C_HW_OCP;
strcpy(adap->name, "IBM IIC");
i2c_set_adapdata(adap, dev);
adap->id = I2C_HW_OCP;
+ adap->class = I2C_CLASS_HWMON;
adap->algo = &iic_algo;
adap->client_register = NULL;
adap->client_unregister = NULL;
adap->algo = &iic_algo;
adap->client_register = NULL;
adap->client_unregister = NULL;