Commit a4870a51 authored by Russell King's avatar Russell King

[ARM] Fix RiscPC i2c drivers for device model.

These drivers got missed when the i2c subsystem was converted to the
device model.
parent abed9c87
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-algo-bit.h> #include <linux/i2c-algo-bit.h>
#include <linux/fs.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -306,7 +307,7 @@ static struct i2c_adapter ioc_ops = { ...@@ -306,7 +307,7 @@ static struct i2c_adapter ioc_ops = {
.id = I2C_HW_B_IOC, .id = I2C_HW_B_IOC,
.algo_data = &ioc_data, .algo_data = &ioc_data,
.client_register = ioc_client_reg, .client_register = ioc_client_reg,
.client_unregister = ioc_client_unreg .client_unregister = ioc_client_unreg,
.dev = { .dev = {
.name = "IOC/IOMD", .name = "IOC/IOMD",
}, },
......
...@@ -34,7 +34,7 @@ static struct i2c_client_address_data addr_data = { ...@@ -34,7 +34,7 @@ static struct i2c_client_address_data addr_data = {
.force = ignore, .force = ignore,
}; };
#define DAT(x) ((unsigned int)(x->data)) #define DAT(x) ((unsigned int)(x->dev.driver_data))
static int static int
pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags, pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
...@@ -51,13 +51,13 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags, ...@@ -51,13 +51,13 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
if (!c) if (!c)
return -ENOMEM; return -ENOMEM;
strcpy(c->name, "PCF8583"); strcpy(c->dev.name, "PCF8583");
c->id = pcf8583_driver.id; c->id = pcf8583_driver.id;
c->flags = 0; c->flags = 0;
c->addr = addr; c->addr = addr;
c->adapter = adap; c->adapter = adap;
c->driver = &pcf8583_driver; c->driver = &pcf8583_driver;
c->data = NULL; c->dev.driver_data = NULL;
if (i2c_transfer(c->adapter, msgs, 2) == 2) if (i2c_transfer(c->adapter, msgs, 2) == 2)
DAT(c) = buf[0]; DAT(c) = buf[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment