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
4aad381f
Commit
4aad381f
authored
Jul 03, 2012
by
Bryan Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
leds: convert Atmel PWM LED driver to devm_kzalloc()
Signed-off-by:
Bryan Wu
<
bryan.wu@canonical.com
>
parent
60a0aadb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
drivers/leds/leds-atmel-pwm.c
drivers/leds/leds-atmel-pwm.c
+2
-3
No files found.
drivers/leds/leds-atmel-pwm.c
View file @
4aad381f
...
...
@@ -46,7 +46,8 @@ static int __devinit pwmled_probe(struct platform_device *pdev)
if
(
!
pdata
||
pdata
->
num_leds
<
1
)
return
-
ENODEV
;
leds
=
kcalloc
(
pdata
->
num_leds
,
sizeof
(
*
leds
),
GFP_KERNEL
);
leds
=
devm_kzalloc
(
&
pdev
->
dev
,
pdata
->
num_leds
*
sizeof
(
*
leds
),
GFP_KERNEL
);
if
(
!
leds
)
return
-
ENOMEM
;
...
...
@@ -108,7 +109,6 @@ static int __devinit pwmled_probe(struct platform_device *pdev)
pwm_channel_free
(
&
leds
[
i
].
pwmc
);
}
}
kfree
(
leds
);
return
status
;
}
...
...
@@ -129,7 +129,6 @@ static int __exit pwmled_remove(struct platform_device *pdev)
pwm_channel_free
(
&
led
->
pwmc
);
}
kfree
(
leds
);
platform_set_drvdata
(
pdev
,
NULL
);
return
0
;
}
...
...
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