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
6e2cf651
Commit
6e2cf651
authored
Mar 02, 2012
by
Grant Likely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpio: constify the data parameter to gpiochip_find()
Signed-off-by:
Grant Likely
<
grant.likely@secretlab.ca
>
parent
b3950d50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.c
+3
-2
drivers/of/gpio.c
drivers/of/gpio.c
+1
-1
include/asm-generic/gpio.h
include/asm-generic/gpio.h
+2
-2
No files found.
drivers/gpio/gpiolib.c
View file @
6e2cf651
...
...
@@ -1152,8 +1152,9 @@ EXPORT_SYMBOL_GPL(gpiochip_remove);
* non-zero, this function will return to the caller and not iterate over any
* more gpio_chips.
*/
struct
gpio_chip
*
gpiochip_find
(
void
*
data
,
int
(
*
match
)(
struct
gpio_chip
*
chip
,
void
*
data
))
struct
gpio_chip
*
gpiochip_find
(
const
void
*
data
,
int
(
*
match
)(
struct
gpio_chip
*
chip
,
const
void
*
data
))
{
struct
gpio_chip
*
chip
=
NULL
;
unsigned
long
flags
;
...
...
drivers/of/gpio.c
View file @
6e2cf651
...
...
@@ -229,7 +229,7 @@ void of_gpiochip_remove(struct gpio_chip *chip)
}
/* Private function for resolving node pointer to gpio_chip */
static
int
of_gpiochip_is_match
(
struct
gpio_chip
*
chip
,
void
*
data
)
static
int
of_gpiochip_is_match
(
struct
gpio_chip
*
chip
,
const
void
*
data
)
{
return
chip
->
of_node
==
data
;
}
...
...
include/asm-generic/gpio.h
View file @
6e2cf651
...
...
@@ -142,9 +142,9 @@ extern int __must_check gpiochip_reserve(int start, int ngpio);
/* add/remove chips */
extern
int
gpiochip_add
(
struct
gpio_chip
*
chip
);
extern
int
__must_check
gpiochip_remove
(
struct
gpio_chip
*
chip
);
extern
struct
gpio_chip
*
gpiochip_find
(
void
*
data
,
extern
struct
gpio_chip
*
gpiochip_find
(
const
void
*
data
,
int
(
*
match
)(
struct
gpio_chip
*
chip
,
void
*
data
));
const
void
*
data
));
/* Always use the library code for GPIO management calls,
...
...
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