Commit df4162c0 authored by Art Haas's avatar Art Haas Committed by David S. Miller

[PATCH] C99 initializers for drivers/i2c

parent ac3b1b9b
......@@ -88,7 +88,7 @@ static int read_bus_i2c(char *buf, char **start, off_t offset, int len,
/* To implement the dynamic /proc/bus/i2c-? files, we need our own
implementation of the read hook */
static struct file_operations i2cproc_operations = {
read: i2cproc_bus_read,
.read = i2cproc_bus_read,
};
static int i2cproc_initialized = 0;
......
......@@ -69,13 +69,13 @@ static int i2cdev_command(struct i2c_client *client, unsigned int cmd,
void *arg);
static struct file_operations i2cdev_fops = {
owner: THIS_MODULE,
llseek: no_llseek,
read: i2cdev_read,
write: i2cdev_write,
ioctl: i2cdev_ioctl,
open: i2cdev_open,
release: i2cdev_release,
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = i2cdev_read,
.write = i2cdev_write,
.ioctl = i2cdev_ioctl,
.open = i2cdev_open,
.release = i2cdev_release,
};
#define I2CDEV_ADAPS_MAX I2C_ADAP_MAX
......@@ -86,24 +86,19 @@ static devfs_handle_t devfs_handle = NULL;
#endif
static struct i2c_driver i2cdev_driver = {
name: "i2c-dev dummy driver",
id: I2C_DRIVERID_I2CDEV,
flags: I2C_DF_DUMMY,
attach_adapter: i2cdev_attach_adapter,
detach_client: i2cdev_detach_client,
command: i2cdev_command,
/* inc_use: NULL,
dec_use: NULL, */
.name = "i2c-dev dummy driver",
.id = I2C_DRIVERID_I2CDEV,
.flags = I2C_DF_DUMMY,
.attach_adapter = i2cdev_attach_adapter,
.detach_client = i2cdev_detach_client,
.command = i2cdev_command,
};
static struct i2c_client i2cdev_client_template = {
name: "I2C /dev entry",
id: 1,
flags: 0,
addr: -1,
/* adapter: NULL, */
driver: &i2cdev_driver,
/* data: NULL */
.name = "I2C /dev entry",
.id = 1,
.addr = -1,
.driver = &i2cdev_driver,
};
static int i2cdev_initialized;
......
......@@ -52,13 +52,13 @@ static int frodo_getscl (void *data)
}
static struct i2c_algo_bit_data bit_frodo_data = {
setsda: frodo_setsda,
setscl: frodo_setscl,
getsda: frodo_getsda,
getscl: frodo_getscl,
udelay: 80,
mdelay: 80,
timeout: 100
.setsda = frodo_setsda,
.setscl = frodo_setscl,
.getsda = frodo_getsda,
.getscl = frodo_getscl,
.udelay = 80,
.mdelay = 80,
.timeout = 100
};
static int frodo_client_register (struct i2c_client *client)
......@@ -82,14 +82,13 @@ static void frodo_dec_use (struct i2c_adapter *adapter)
}
static struct i2c_adapter frodo_ops = {
name: "Frodo adapter driver",
id: I2C_HW_B_FRODO,
algo: NULL,
algo_data: &bit_frodo_data,
inc_use: frodo_inc_use,
dec_use: frodo_dec_use,
client_register: frodo_client_register,
client_unregister: frodo_client_unregister
.name = "Frodo adapter driver",
.id = I2C_HW_B_FRODO,
.algo_data = &bit_frodo_data,
.inc_use = frodo_inc_use,
.dec_use = frodo_dec_use,
.client_register = frodo_client_register,
.client_unregister = frodo_client_unregister
};
static int __init i2c_frodo_init (void)
......
......@@ -91,7 +91,7 @@ static void rpx_dec_use(struct i2c_adapter *adap)
}
static struct i2c_algo_8xx_data rpx_data = {
setisr: rpx_install_isr
.setisr = rpx_install_isr
};
......
......@@ -419,10 +419,10 @@ static void scx200_acb_dec_use(struct i2c_adapter *adapter)
/* For now, we only handle combined mode (smbus) */
static struct i2c_algorithm scx200_acb_algorithm = {
name: "NatSemi SCx200 ACCESS.bus",
id: I2C_ALGO_SMBUS,
smbus_xfer: scx200_acb_smbus_xfer,
functionality: scx200_acb_func,
.name = "NatSemi SCx200 ACCESS.bus",
.id = I2C_ALGO_SMBUS,
.smbus_xfer = scx200_acb_smbus_xfer,
.functionality = scx200_acb_func,
};
struct scx200_acb_iface *scx200_acb_list;
......
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