Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
df4162c0
Commit
df4162c0
authored
Nov 17, 2002
by
Art Haas
Committed by
David S. Miller
Nov 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] C99 initializers for drivers/i2c
parent
ac3b1b9b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
43 deletions
+37
-43
drivers/i2c/i2c-core.c
drivers/i2c/i2c-core.c
+1
-1
drivers/i2c/i2c-dev.c
drivers/i2c/i2c-dev.c
+17
-22
drivers/i2c/i2c-frodo.c
drivers/i2c/i2c-frodo.c
+14
-15
drivers/i2c/i2c-rpx.c
drivers/i2c/i2c-rpx.c
+1
-1
drivers/i2c/scx200_acb.c
drivers/i2c/scx200_acb.c
+4
-4
No files found.
drivers/i2c/i2c-core.c
View file @
df4162c0
...
...
@@ -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
;
...
...
drivers/i2c/i2c-dev.c
View file @
df4162c0
...
...
@@ -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
;
...
...
drivers/i2c/i2c-frodo.c
View file @
df4162c0
...
...
@@ -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
)
...
...
drivers/i2c/i2c-rpx.c
View file @
df4162c0
...
...
@@ -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
};
...
...
drivers/i2c/scx200_acb.c
View file @
df4162c0
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment