clk: sunxi: factors: Consolidate get_factors parameters into a struct
The .get_factors callback of factors_clk has 6 parameters. To extend factors_clk in any way that requires adding parameters to .get_factors would make that list even longer, not to mention changing all the function declarations. Do this once now and consolidate all the parameters into a struct. Also drop the space before function pointer arguments, since checkpatch complains. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:

committed by
Maxime Ripard

szülő
4cbeaebb8a
commit
cfa6368860
@@ -19,12 +19,21 @@ struct clk_factors_config {
|
||||
u8 n_start;
|
||||
};
|
||||
|
||||
struct factors_request {
|
||||
unsigned long rate;
|
||||
unsigned long parent_rate;
|
||||
u8 n;
|
||||
u8 k;
|
||||
u8 m;
|
||||
u8 p;
|
||||
};
|
||||
|
||||
struct factors_data {
|
||||
int enable;
|
||||
int mux;
|
||||
int muxmask;
|
||||
const struct clk_factors_config *table;
|
||||
void (*getter) (u32 *rate, u32 parent_rate, u8 *n, u8 *k, u8 *m, u8 *p);
|
||||
void (*getter)(struct factors_request *req);
|
||||
const char *name;
|
||||
};
|
||||
|
||||
@@ -32,7 +41,7 @@ struct clk_factors {
|
||||
struct clk_hw hw;
|
||||
void __iomem *reg;
|
||||
const struct clk_factors_config *config;
|
||||
void (*get_factors) (u32 *rate, u32 parent, u8 *n, u8 *k, u8 *m, u8 *p);
|
||||
void (*get_factors)(struct factors_request *req);
|
||||
spinlock_t *lock;
|
||||
/* for cleanup */
|
||||
struct clk_mux *mux;
|
||||
|
Reference in New Issue
Block a user