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
51f01e4c
Commit
51f01e4c
authored
Sep 08, 2016
by
Thierry Reding
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-4.9/core' into for-next
parents
29b4817d
0733424c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
drivers/pwm/core.c
drivers/pwm/core.c
+2
-0
drivers/pwm/sysfs.c
drivers/pwm/sysfs.c
+18
-0
include/linux/pwm.h
include/linux/pwm.h
+5
-0
No files found.
drivers/pwm/core.c
View file @
51f01e4c
...
...
@@ -339,6 +339,8 @@ int pwmchip_remove(struct pwm_chip *chip)
unsigned
int
i
;
int
ret
=
0
;
pwmchip_sysfs_unexport_children
(
chip
);
mutex_lock
(
&
pwm_lock
);
for
(
i
=
0
;
i
<
chip
->
npwm
;
i
++
)
{
...
...
drivers/pwm/sysfs.c
View file @
51f01e4c
...
...
@@ -409,6 +409,24 @@ void pwmchip_sysfs_unexport(struct pwm_chip *chip)
}
}
void
pwmchip_sysfs_unexport_children
(
struct
pwm_chip
*
chip
)
{
struct
device
*
parent
;
unsigned
int
i
;
parent
=
class_find_device
(
&
pwm_class
,
NULL
,
chip
,
pwmchip_sysfs_match
);
if
(
!
parent
)
return
;
for
(
i
=
0
;
i
<
chip
->
npwm
;
i
++
)
{
struct
pwm_device
*
pwm
=
&
chip
->
pwms
[
i
];
if
(
test_bit
(
PWMF_EXPORTED
,
&
pwm
->
flags
))
pwm_unexport_child
(
parent
,
pwm
);
}
}
static
int
__init
pwm_sysfs_init
(
void
)
{
return
class_register
(
&
pwm_class
);
...
...
include/linux/pwm.h
View file @
51f01e4c
...
...
@@ -641,6 +641,7 @@ static inline void pwm_remove_table(struct pwm_lookup *table, size_t num)
#ifdef CONFIG_PWM_SYSFS
void
pwmchip_sysfs_export
(
struct
pwm_chip
*
chip
);
void
pwmchip_sysfs_unexport
(
struct
pwm_chip
*
chip
);
void
pwmchip_sysfs_unexport_children
(
struct
pwm_chip
*
chip
);
#else
static
inline
void
pwmchip_sysfs_export
(
struct
pwm_chip
*
chip
)
{
...
...
@@ -649,6 +650,10 @@ static inline void pwmchip_sysfs_export(struct pwm_chip *chip)
static
inline
void
pwmchip_sysfs_unexport
(
struct
pwm_chip
*
chip
)
{
}
static
inline
void
pwmchip_sysfs_unexport_children
(
struct
pwm_chip
*
chip
)
{
}
#endif
/* CONFIG_PWM_SYSFS */
#endif
/* __LINUX_PWM_H */
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