diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-11-30 20:24:37 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-15 03:10:10 -0500 |
commit | b3bf41be06634d69959a68a2b53e1ffc92f0d103 (patch) | |
tree | 7575fc3d60e9a2f99e74b2862e1b3a43b7df1f92 /arch/arm/mach-s3c2442/clock.c | |
parent | 13bbd88504bfa0d205fa4121322869d8d7e083d0 (diff) |
ARM: SAMSUNG: Reduce size of struct clk.
Reduce the size of struct clk by 12 bytes and make defining clocks with
common implementation functions easier by moving the set_rate, get_rate,
round_rate and set_parent calls into a new structure called 'struct clk_ops'
and using that instead.
This change does make a few clocks larger as they need their own clk_ops,
but this is outweighed by the number of clocks with either no ops or having
a common set of ops.
Update all the users of this.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2442/clock.c')
-rw-r--r-- | arch/arm/mach-s3c2442/clock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2442/clock.c b/arch/arm/mach-s3c2442/clock.c index ea1aa1f5157a..d9b692a12480 100644 --- a/arch/arm/mach-s3c2442/clock.c +++ b/arch/arm/mach-s3c2442/clock.c | |||
@@ -109,8 +109,10 @@ static struct clk s3c2442_clk_cam = { | |||
109 | static struct clk s3c2442_clk_cam_upll = { | 109 | static struct clk s3c2442_clk_cam_upll = { |
110 | .name = "camif-upll", | 110 | .name = "camif-upll", |
111 | .id = -1, | 111 | .id = -1, |
112 | .set_rate = s3c2442_camif_upll_setrate, | 112 | .ops = &(struct clk_ops) { |
113 | .round_rate = s3c2442_camif_upll_round, | 113 | .set_rate = s3c2442_camif_upll_setrate, |
114 | .round_rate = s3c2442_camif_upll_round, | ||
115 | }, | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | static int s3c2442_clk_add(struct sys_device *sysdev) | 118 | static int s3c2442_clk_add(struct sys_device *sysdev) |