diff options
Diffstat (limited to 'drivers/clk/clk-divider.c')
-rw-r--r-- | drivers/clk/clk-divider.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 90627e4069af..8ea11b444528 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c | |||
@@ -167,6 +167,7 @@ struct clk *clk_register_divider(struct device *dev, const char *name, | |||
167 | { | 167 | { |
168 | struct clk_divider *div; | 168 | struct clk_divider *div; |
169 | struct clk *clk; | 169 | struct clk *clk; |
170 | struct clk_init_data init; | ||
170 | 171 | ||
171 | /* allocate the divider */ | 172 | /* allocate the divider */ |
172 | div = kzalloc(sizeof(struct clk_divider), GFP_KERNEL); | 173 | div = kzalloc(sizeof(struct clk_divider), GFP_KERNEL); |
@@ -175,19 +176,22 @@ struct clk *clk_register_divider(struct device *dev, const char *name, | |||
175 | return ERR_PTR(-ENOMEM); | 176 | return ERR_PTR(-ENOMEM); |
176 | } | 177 | } |
177 | 178 | ||
179 | init.name = name; | ||
180 | init.ops = &clk_divider_ops; | ||
181 | init.flags = flags; | ||
182 | init.parent_names = (parent_name ? &parent_name: NULL); | ||
183 | init.num_parents = (parent_name ? 1 : 0); | ||
184 | |||
178 | /* struct clk_divider assignments */ | 185 | /* struct clk_divider assignments */ |
179 | div->reg = reg; | 186 | div->reg = reg; |
180 | div->shift = shift; | 187 | div->shift = shift; |
181 | div->width = width; | 188 | div->width = width; |
182 | div->flags = clk_divider_flags; | 189 | div->flags = clk_divider_flags; |
183 | div->lock = lock; | 190 | div->lock = lock; |
191 | div->hw.init = &init; | ||
184 | 192 | ||
185 | /* register the clock */ | 193 | /* register the clock */ |
186 | clk = clk_register(dev, name, | 194 | clk = clk_register(dev, &div->hw); |
187 | &clk_divider_ops, &div->hw, | ||
188 | (parent_name ? &parent_name: NULL), | ||
189 | (parent_name ? 1 : 0), | ||
190 | flags); | ||
191 | 195 | ||
192 | if (IS_ERR(clk)) | 196 | if (IS_ERR(clk)) |
193 | kfree(div); | 197 | kfree(div); |