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
nexedi
linux
Commits
71bcb29d
Commit
71bcb29d
authored
Mar 20, 2003
by
Greg Kroah-Hartman
Committed by
Petr Vandrovec
Mar 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] i2c: remove *data from i2c_adapter, as dev->data should be used instead.
parent
50fb80a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
drivers/i2c/i2c-elv.c
drivers/i2c/i2c-elv.c
+1
-1
drivers/i2c/scx200_acb.c
drivers/i2c/scx200_acb.c
+2
-2
include/linux/i2c.h
include/linux/i2c.h
+11
-6
No files found.
drivers/i2c/i2c-elv.c
View file @
71bcb29d
...
...
@@ -150,7 +150,7 @@ static int __init i2c_bitelv_init(void)
return
-
ENODEV
;
}
}
else
{
bit_elv_ops
.
data
=
(
void
*
)
base
;
i2c_set_adapdata
(
&
bit_elv_ops
,
(
void
*
)
base
)
;
if
(
bit_elv_init
()
==
0
)
{
if
(
i2c_bit_add_bus
(
&
bit_elv_ops
)
<
0
)
return
-
ENODEV
;
...
...
drivers/i2c/scx200_acb.c
View file @
71bcb29d
...
...
@@ -289,7 +289,7 @@ static s32 scx200_acb_smbus_xfer(struct i2c_adapter *adapter,
char
rw
,
u8
command
,
int
size
,
union
i2c_smbus_data
*
data
)
{
struct
scx200_acb_iface
*
iface
=
adapter
->
data
;
struct
scx200_acb_iface
*
iface
=
i2c_get_adapdata
(
adapter
)
;
int
len
;
u8
*
buffer
;
u16
cur_word
;
...
...
@@ -455,7 +455,7 @@ static int __init scx200_acb_create(int base, int index)
memset
(
iface
,
0
,
sizeof
(
*
iface
));
adapter
=
&
iface
->
adapter
;
adapter
->
data
=
iface
;
i2c_set_adapdata
(
adapter
,
iface
)
;
snprintf
(
adapter
->
dev
.
name
,
DEVICE_NAME_SIZE
,
"SCx200 ACB%d"
,
index
);
adapter
->
owner
=
THIS_MODULE
;
adapter
->
id
=
I2C_ALGO_SMBUS
;
...
...
include/linux/i2c.h
View file @
71bcb29d
...
...
@@ -219,11 +219,6 @@ struct i2c_adapter {
int
(
*
client_register
)(
struct
i2c_client
*
);
int
(
*
client_unregister
)(
struct
i2c_client
*
);
void
*
data
;
/* private data for the adapter */
/* some data fields that are used by all types */
/* these data fields are readonly to the public */
/* and can be set via the i2c_ioctl call */
/* data fields that are valid for all devices */
struct
semaphore
bus
;
struct
semaphore
list
;
...
...
@@ -242,6 +237,16 @@ struct i2c_adapter {
};
#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
static
inline
void
*
i2c_get_adapdata
(
struct
i2c_adapter
*
dev
)
{
return
dev_get_drvdata
(
&
dev
->
dev
);
}
static
inline
void
i2c_set_adapdata
(
struct
i2c_adapter
*
dev
,
void
*
data
)
{
return
dev_set_drvdata
(
&
dev
->
dev
,
data
);
}
/*flags for the driver struct: */
#define I2C_DF_NOTIFY 0x01
/* notify on bus (de/a)ttaches */
#define I2C_DF_DUMMY 0x02
/* do not connect any clients */
...
...
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