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
85b49be7
Commit
85b49be7
authored
Feb 25, 2003
by
Christoph Hellwig
Committed by
Linus Torvalds
Feb 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] remove an unused function from the i2c core
(from lm_sensors CVS)
parent
6888eb92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
69 deletions
+0
-69
drivers/i2c/i2c-core.c
drivers/i2c/i2c-core.c
+0
-69
No files found.
drivers/i2c/i2c-core.c
View file @
85b49be7
...
...
@@ -458,73 +458,6 @@ static void i2c_dec_use_client(struct i2c_client *client)
module_put
(
client
->
adapter
->
owner
);
}
struct
i2c_client
*
i2c_get_client
(
int
driver_id
,
int
adapter_id
,
struct
i2c_client
*
prev
)
{
int
i
,
j
;
/* Will iterate through the list of clients in each adapter of adapters-list
in search for a client that matches the search criteria. driver_id or
adapter_id are ignored if set to 0. If both are ignored this returns
first client found. */
i
=
j
=
0
;
/* set starting point */
if
(
prev
)
{
if
(
!
(
prev
->
adapter
))
return
(
struct
i2c_client
*
)
-
EINVAL
;
for
(
j
=
0
;
j
<
I2C_ADAP_MAX
;
j
++
)
if
(
prev
->
adapter
==
adapters
[
j
])
break
;
/* invalid starting point? */
if
(
I2C_ADAP_MAX
==
j
)
{
printk
(
KERN_WARNING
" i2c-core.o: get_client adapter for client:[%s] not found
\n
"
,
prev
->
name
);
return
(
struct
i2c_client
*
)
-
ENODEV
;
}
for
(
i
=
0
;
i
<
I2C_CLIENT_MAX
;
i
++
)
if
(
prev
==
adapters
[
j
]
->
clients
[
i
])
break
;
/* invalid starting point? */
if
(
I2C_CLIENT_MAX
==
i
)
{
printk
(
KERN_WARNING
" i2c-core.o: get_client client:[%s] not found
\n
"
,
prev
->
name
);
return
(
struct
i2c_client
*
)
-
ENODEV
;
}
i
++
;
/* start from one after prev */
}
for
(;
j
<
I2C_ADAP_MAX
;
j
++
)
{
if
(
!
adapters
[
j
])
continue
;
if
(
adapter_id
&&
(
adapters
[
j
]
->
id
!=
adapter_id
))
continue
;
for
(;
i
<
I2C_CLIENT_MAX
;
i
++
)
{
if
(
!
adapters
[
j
]
->
clients
[
i
])
continue
;
if
(
driver_id
&&
(
adapters
[
j
]
->
clients
[
i
]
->
driver
->
id
!=
driver_id
))
continue
;
if
(
adapters
[
j
]
->
clients
[
i
]
->
flags
&
I2C_CLIENT_ALLOW_USE
)
return
adapters
[
j
]
->
clients
[
i
];
}
i
=
0
;
}
return
0
;
}
int
i2c_use_client
(
struct
i2c_client
*
client
)
{
if
(
!
i2c_inc_use_client
(
client
))
...
...
@@ -1414,12 +1347,10 @@ EXPORT_SYMBOL(i2c_add_driver);
EXPORT_SYMBOL
(
i2c_del_driver
);
EXPORT_SYMBOL
(
i2c_attach_client
);
EXPORT_SYMBOL
(
i2c_detach_client
);
EXPORT_SYMBOL
(
i2c_get_client
);
EXPORT_SYMBOL
(
i2c_use_client
);
EXPORT_SYMBOL
(
i2c_release_client
);
EXPORT_SYMBOL
(
i2c_check_addr
);
EXPORT_SYMBOL
(
i2c_master_send
);
EXPORT_SYMBOL
(
i2c_master_recv
);
EXPORT_SYMBOL
(
i2c_control
);
...
...
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