BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
782f00ea
Commit
782f00ea
authored
Nov 06, 2018
by
David Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expander: use devm_gpio_request_one
Use devm_gpio_request_one instead of devm_gpio_request + gpio_direction_output
parent
5c49b560
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
expander.c
linux_kernel_modules/expander/expander.c
+5
-2
No files found.
linux_kernel_modules/expander/expander.c
View file @
782f00ea
...
...
@@ -69,9 +69,12 @@ static void gpio_initial_status(struct platform_device *pdev,
int
function_number
,
int
function_val
,
atomic_t
*
atomic_val
)
{
devm_gpio_request
(
&
pdev
->
dev
,
function_number
,
dev_name
(
&
pdev
->
dev
));
devm_gpio_request_one
(
&
pdev
->
dev
,
function_number
,
(
GPIOF_DIR_OUT
|
(
function_val
?
GPIOF_INIT_HIGH
:
GPIOF_INIT_LOW
)),
attr
->
attr
.
name
);
atomic_set
(
atomic_val
,
function_val
);
gpio_direction_output
(
function_number
,
function_val
);
device_create_file
(
&
pdev
->
dev
,
attr
);
}
...
...
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