@@ -350,7 +350,7 @@ struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev,
350350 const char * parent_name , const struct clk_hw * parent_hw ,
351351 const struct clk_parent_data * parent_data , unsigned long flags ,
352352 unsigned long fixed_rate , unsigned long fixed_accuracy ,
353- unsigned long clk_fixed_flags );
353+ unsigned long clk_fixed_flags , bool devm );
354354struct clk * clk_register_fixed_rate (struct device * dev , const char * name ,
355355 const char * parent_name , unsigned long flags ,
356356 unsigned long fixed_rate );
@@ -365,7 +365,20 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
365365 */
366366#define clk_hw_register_fixed_rate (dev , name , parent_name , flags , fixed_rate ) \
367367 __clk_hw_register_fixed_rate((dev), NULL, (name), (parent_name), NULL, \
368- NULL, (flags), (fixed_rate), 0, 0)
368+ NULL, (flags), (fixed_rate), 0, 0, false)
369+
370+ /**
371+ * devm_clk_hw_register_fixed_rate - register fixed-rate clock with the clock
372+ * framework
373+ * @dev: device that is registering this clock
374+ * @name: name of this clock
375+ * @parent_name: name of clock's parent
376+ * @flags: framework-specific flags
377+ * @fixed_rate: non-adjustable clock rate
378+ */
379+ #define devm_clk_hw_register_fixed_rate (dev , name , parent_name , flags , fixed_rate ) \
380+ __clk_hw_register_fixed_rate((dev), NULL, (name), (parent_name), NULL, \
381+ NULL, (flags), (fixed_rate), 0, 0, true)
369382/**
370383 * clk_hw_register_fixed_rate_parent_hw - register fixed-rate clock with
371384 * the clock framework
@@ -378,7 +391,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
378391#define clk_hw_register_fixed_rate_parent_hw (dev , name , parent_hw , flags , \
379392 fixed_rate ) \
380393 __clk_hw_register_fixed_rate((dev), NULL, (name), NULL, (parent_hw), \
381- NULL, (flags), (fixed_rate), 0, 0)
394+ NULL, (flags), (fixed_rate), 0, 0, false )
382395/**
383396 * clk_hw_register_fixed_rate_parent_data - register fixed-rate clock with
384397 * the clock framework
@@ -392,7 +405,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
392405 fixed_rate ) \
393406 __clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL, \
394407 (parent_data), (flags), (fixed_rate), 0, \
395- 0)
408+ 0, false )
396409/**
397410 * clk_hw_register_fixed_rate_with_accuracy - register fixed-rate clock with
398411 * the clock framework
@@ -408,7 +421,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
408421 fixed_accuracy ) \
409422 __clk_hw_register_fixed_rate((dev), NULL, (name), (parent_name), \
410423 NULL, NULL, (flags), (fixed_rate), \
411- (fixed_accuracy), 0)
424+ (fixed_accuracy), 0, false )
412425/**
413426 * clk_hw_register_fixed_rate_with_accuracy_parent_hw - register fixed-rate
414427 * clock with the clock framework
@@ -423,7 +436,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
423436 parent_hw , flags , fixed_rate , fixed_accuracy ) \
424437 __clk_hw_register_fixed_rate((dev), NULL, (name), NULL, (parent_hw) \
425438 NULL, NULL, (flags), (fixed_rate), \
426- (fixed_accuracy), 0)
439+ (fixed_accuracy), 0, false )
427440/**
428441 * clk_hw_register_fixed_rate_with_accuracy_parent_data - register fixed-rate
429442 * clock with the clock framework
@@ -438,7 +451,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
438451 parent_data , flags , fixed_rate , fixed_accuracy ) \
439452 __clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL, \
440453 (parent_data), NULL, (flags), \
441- (fixed_rate), (fixed_accuracy), 0)
454+ (fixed_rate), (fixed_accuracy), 0, false )
442455/**
443456 * clk_hw_register_fixed_rate_parent_accuracy - register fixed-rate clock with
444457 * the clock framework
@@ -452,7 +465,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
452465 flags , fixed_rate ) \
453466 __clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL, \
454467 (parent_data), (flags), (fixed_rate), 0, \
455- CLK_FIXED_RATE_PARENT_ACCURACY)
468+ CLK_FIXED_RATE_PARENT_ACCURACY, false )
456469
457470void clk_unregister_fixed_rate (struct clk * clk );
458471void clk_hw_unregister_fixed_rate (struct clk_hw * hw );
0 commit comments