]> git.hungrycats.org Git - linux/commitdiff
[ARM] Make Acorn I2C build again.
authorRussell King <rmk@flint.arm.linux.org.uk>
Fri, 20 Feb 2004 19:42:14 +0000 (19:42 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 20 Feb 2004 19:42:14 +0000 (19:42 +0000)
Unfortunately some i2c drivers were missed when the "name" element of
struct device was removed.  This cset fixes these drivers.

drivers/acorn/char/i2c.c
drivers/acorn/char/pcf8583.c

index 997cf28f4b7527a3491a610b40b0e5df0358b160..cb662980f90eb5212e4ac559213b37f3e0388f36 100644 (file)
@@ -311,9 +311,6 @@ static struct i2c_adapter ioc_ops = {
        .algo_data              = &ioc_data,
        .client_register        = ioc_client_reg,
        .client_unregister      = ioc_client_unreg,
-       .dev                    = {
-               .name           = "IOC/IOMD",
-       },
 };
 
 static int __init i2c_ioc_init(void)
index 6cf9e9259ceffa9bf3e4b623287ebf6eb9d16e9b..ad768a18780fba313b448fe97c743e9db905f732 100644 (file)
@@ -37,8 +37,7 @@ static struct i2c_client_address_data addr_data = {
 #define DAT(x) ((unsigned int)(x->dev.driver_data))
 
 static int
-pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
-              int kind)
+pcf8583_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        struct i2c_client *c;
        unsigned char buf[1], ad[1] = { 0 };
@@ -51,13 +50,11 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
        if (!c)
                return -ENOMEM;
 
-       strcpy(c->dev.name, "PCF8583");
+       memset(c, 0, sizeof(*c));
        c->id           = pcf8583_driver.id;
-       c->flags        = 0;
        c->addr         = addr;
        c->adapter      = adap;
        c->driver       = &pcf8583_driver;
-       c->dev.driver_data = NULL;
 
        if (i2c_transfer(c->adapter, msgs, 2) == 2)
                DAT(c) = buf[0];