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