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
d99a910a
Commit
d99a910a
authored
Sep 19, 2012
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'clkdev' into fixes
parents
2b25d9f6
20332ff3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
51 deletions
+56
-51
arch/m68k/platform/coldfire/clk.c
arch/m68k/platform/coldfire/clk.c
+0
-6
drivers/clk/Makefile
drivers/clk/Makefile
+1
-0
drivers/clk/clk-devres.c
drivers/clk/clk-devres.c
+55
-0
drivers/clk/clkdev.c
drivers/clk/clkdev.c
+0
-45
No files found.
arch/m68k/platform/coldfire/clk.c
View file @
d99a910a
...
...
@@ -146,9 +146,3 @@ struct clk_ops clk_ops1 = {
};
#endif
/* MCFPM_PPMCR1 */
#endif
/* MCFPM_PPMCR0 */
struct
clk
*
devm_clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
return
NULL
;
}
EXPORT_SYMBOL
(
devm_clk_get
);
drivers/clk/Makefile
View file @
d99a910a
# common clock types
obj-$(CONFIG_HAVE_CLK)
+=
clk-devres.o
obj-$(CONFIG_CLKDEV_LOOKUP)
+=
clkdev.o
obj-$(CONFIG_COMMON_CLK)
+=
clk.o clk-fixed-rate.o clk-gate.o
\
clk-mux.o clk-divider.o clk-fixed-factor.o
...
...
drivers/clk/clk-devres.c
0 → 100644
View file @
d99a910a
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/gfp.h>
static
void
devm_clk_release
(
struct
device
*
dev
,
void
*
res
)
{
clk_put
(
*
(
struct
clk
**
)
res
);
}
struct
clk
*
devm_clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
struct
clk
**
ptr
,
*
clk
;
ptr
=
devres_alloc
(
devm_clk_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
ERR_PTR
(
-
ENOMEM
);
clk
=
clk_get
(
dev
,
id
);
if
(
!
IS_ERR
(
clk
))
{
*
ptr
=
clk
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
clk
;
}
EXPORT_SYMBOL
(
devm_clk_get
);
static
int
devm_clk_match
(
struct
device
*
dev
,
void
*
res
,
void
*
data
)
{
struct
clk
**
c
=
res
;
if
(
!
c
||
!*
c
)
{
WARN_ON
(
!
c
||
!*
c
);
return
0
;
}
return
*
c
==
data
;
}
void
devm_clk_put
(
struct
device
*
dev
,
struct
clk
*
clk
)
{
int
ret
;
ret
=
devres_release
(
dev
,
devm_clk_release
,
devm_clk_match
,
clk
);
WARN_ON
(
ret
);
}
EXPORT_SYMBOL
(
devm_clk_put
);
drivers/clk/clkdev.c
View file @
d99a910a
...
...
@@ -171,51 +171,6 @@ void clk_put(struct clk *clk)
}
EXPORT_SYMBOL
(
clk_put
);
static
void
devm_clk_release
(
struct
device
*
dev
,
void
*
res
)
{
clk_put
(
*
(
struct
clk
**
)
res
);
}
struct
clk
*
devm_clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
struct
clk
**
ptr
,
*
clk
;
ptr
=
devres_alloc
(
devm_clk_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
ERR_PTR
(
-
ENOMEM
);
clk
=
clk_get
(
dev
,
id
);
if
(
!
IS_ERR
(
clk
))
{
*
ptr
=
clk
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
clk
;
}
EXPORT_SYMBOL
(
devm_clk_get
);
static
int
devm_clk_match
(
struct
device
*
dev
,
void
*
res
,
void
*
data
)
{
struct
clk
**
c
=
res
;
if
(
!
c
||
!*
c
)
{
WARN_ON
(
!
c
||
!*
c
);
return
0
;
}
return
*
c
==
data
;
}
void
devm_clk_put
(
struct
device
*
dev
,
struct
clk
*
clk
)
{
int
ret
;
ret
=
devres_destroy
(
dev
,
devm_clk_release
,
devm_clk_match
,
clk
);
WARN_ON
(
ret
);
}
EXPORT_SYMBOL
(
devm_clk_put
);
void
clkdev_add
(
struct
clk_lookup
*
cl
)
{
mutex_lock
(
&
clocks_mutex
);
...
...
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