@@ -350,7 +350,7 @@ struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev,
350
350
const char * parent_name , const struct clk_hw * parent_hw ,
351
351
const struct clk_parent_data * parent_data , unsigned long flags ,
352
352
unsigned long fixed_rate , unsigned long fixed_accuracy ,
353
- unsigned long clk_fixed_flags );
353
+ unsigned long clk_fixed_flags , bool devm );
354
354
struct clk * clk_register_fixed_rate (struct device * dev , const char * name ,
355
355
const char * parent_name , unsigned long flags ,
356
356
unsigned long fixed_rate );
@@ -365,7 +365,20 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
365
365
*/
366
366
#define clk_hw_register_fixed_rate (dev , name , parent_name , flags , fixed_rate ) \
367
367
__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)
369
382
/**
370
383
* clk_hw_register_fixed_rate_parent_hw - register fixed-rate clock with
371
384
* the clock framework
@@ -378,7 +391,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
378
391
#define clk_hw_register_fixed_rate_parent_hw (dev , name , parent_hw , flags , \
379
392
fixed_rate ) \
380
393
__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 )
382
395
/**
383
396
* clk_hw_register_fixed_rate_parent_data - register fixed-rate clock with
384
397
* the clock framework
@@ -392,7 +405,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
392
405
fixed_rate ) \
393
406
__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL, \
394
407
(parent_data), (flags), (fixed_rate), 0, \
395
- 0)
408
+ 0, false )
396
409
/**
397
410
* clk_hw_register_fixed_rate_with_accuracy - register fixed-rate clock with
398
411
* the clock framework
@@ -408,7 +421,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
408
421
fixed_accuracy ) \
409
422
__clk_hw_register_fixed_rate((dev), NULL, (name), (parent_name), \
410
423
NULL, NULL, (flags), (fixed_rate), \
411
- (fixed_accuracy), 0)
424
+ (fixed_accuracy), 0, false )
412
425
/**
413
426
* clk_hw_register_fixed_rate_with_accuracy_parent_hw - register fixed-rate
414
427
* clock with the clock framework
@@ -423,7 +436,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
423
436
parent_hw , flags , fixed_rate , fixed_accuracy ) \
424
437
__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, (parent_hw) \
425
438
NULL, NULL, (flags), (fixed_rate), \
426
- (fixed_accuracy), 0)
439
+ (fixed_accuracy), 0, false )
427
440
/**
428
441
* clk_hw_register_fixed_rate_with_accuracy_parent_data - register fixed-rate
429
442
* clock with the clock framework
@@ -438,7 +451,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
438
451
parent_data , flags , fixed_rate , fixed_accuracy ) \
439
452
__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL, \
440
453
(parent_data), NULL, (flags), \
441
- (fixed_rate), (fixed_accuracy), 0)
454
+ (fixed_rate), (fixed_accuracy), 0, false )
442
455
/**
443
456
* clk_hw_register_fixed_rate_parent_accuracy - register fixed-rate clock with
444
457
* the clock framework
@@ -452,7 +465,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
452
465
flags , fixed_rate ) \
453
466
__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL, \
454
467
(parent_data), (flags), (fixed_rate), 0, \
455
- CLK_FIXED_RATE_PARENT_ACCURACY)
468
+ CLK_FIXED_RATE_PARENT_ACCURACY, false )
456
469
457
470
void clk_unregister_fixed_rate (struct clk * clk );
458
471
void clk_hw_unregister_fixed_rate (struct clk_hw * hw );
0 commit comments