Skip to content

Commit 6d74349

Browse files
committed
PM / devfreq: Remove unneeded extern keyword
Remove unneeded extern keyword from devfreq-related header file and adjust the indentation of function parameter to keep the consistency in header file Reviewed-by: Lukasz Luba <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 4bb1faa commit 6d74349

File tree

2 files changed

+57
-60
lines changed

2 files changed

+57
-60
lines changed

drivers/devfreq/governor.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,16 @@ struct devfreq_governor {
5757
unsigned int event, void *data);
5858
};
5959

60-
extern void devfreq_monitor_start(struct devfreq *devfreq);
61-
extern void devfreq_monitor_stop(struct devfreq *devfreq);
62-
extern void devfreq_monitor_suspend(struct devfreq *devfreq);
63-
extern void devfreq_monitor_resume(struct devfreq *devfreq);
64-
extern void devfreq_interval_update(struct devfreq *devfreq,
65-
unsigned int *delay);
60+
void devfreq_monitor_start(struct devfreq *devfreq);
61+
void devfreq_monitor_stop(struct devfreq *devfreq);
62+
void devfreq_monitor_suspend(struct devfreq *devfreq);
63+
void devfreq_monitor_resume(struct devfreq *devfreq);
64+
void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay);
6665

67-
extern int devfreq_add_governor(struct devfreq_governor *governor);
68-
extern int devfreq_remove_governor(struct devfreq_governor *governor);
66+
int devfreq_add_governor(struct devfreq_governor *governor);
67+
int devfreq_remove_governor(struct devfreq_governor *governor);
6968

70-
extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
69+
int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
7170

7271
static inline int devfreq_update_stats(struct devfreq *df)
7372
{

include/linux/devfreq.h

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -201,60 +201,58 @@ struct devfreq_freqs {
201201
};
202202

203203
#if defined(CONFIG_PM_DEVFREQ)
204-
extern struct devfreq *devfreq_add_device(struct device *dev,
205-
struct devfreq_dev_profile *profile,
206-
const char *governor_name,
207-
void *data);
208-
extern int devfreq_remove_device(struct devfreq *devfreq);
209-
extern struct devfreq *devm_devfreq_add_device(struct device *dev,
210-
struct devfreq_dev_profile *profile,
211-
const char *governor_name,
212-
void *data);
213-
extern void devm_devfreq_remove_device(struct device *dev,
214-
struct devfreq *devfreq);
204+
struct devfreq *devfreq_add_device(struct device *dev,
205+
struct devfreq_dev_profile *profile,
206+
const char *governor_name,
207+
void *data);
208+
int devfreq_remove_device(struct devfreq *devfreq);
209+
struct devfreq *devm_devfreq_add_device(struct device *dev,
210+
struct devfreq_dev_profile *profile,
211+
const char *governor_name,
212+
void *data);
213+
void devm_devfreq_remove_device(struct device *dev, struct devfreq *devfreq);
215214

216215
/* Supposed to be called by PM callbacks */
217-
extern int devfreq_suspend_device(struct devfreq *devfreq);
218-
extern int devfreq_resume_device(struct devfreq *devfreq);
216+
int devfreq_suspend_device(struct devfreq *devfreq);
217+
int devfreq_resume_device(struct devfreq *devfreq);
219218

220-
extern void devfreq_suspend(void);
221-
extern void devfreq_resume(void);
219+
void devfreq_suspend(void);
220+
void devfreq_resume(void);
222221

223222
/**
224223
* update_devfreq() - Reevaluate the device and configure frequency
225224
* @devfreq: the devfreq device
226225
*
227226
* Note: devfreq->lock must be held
228227
*/
229-
extern int update_devfreq(struct devfreq *devfreq);
228+
int update_devfreq(struct devfreq *devfreq);
230229

231230
/* Helper functions for devfreq user device driver with OPP. */
232-
extern struct dev_pm_opp *devfreq_recommended_opp(struct device *dev,
233-
unsigned long *freq, u32 flags);
234-
extern int devfreq_register_opp_notifier(struct device *dev,
235-
struct devfreq *devfreq);
236-
extern int devfreq_unregister_opp_notifier(struct device *dev,
237-
struct devfreq *devfreq);
238-
extern int devm_devfreq_register_opp_notifier(struct device *dev,
239-
struct devfreq *devfreq);
240-
extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
241-
struct devfreq *devfreq);
242-
extern int devfreq_register_notifier(struct devfreq *devfreq,
243-
struct notifier_block *nb,
244-
unsigned int list);
245-
extern int devfreq_unregister_notifier(struct devfreq *devfreq,
246-
struct notifier_block *nb,
247-
unsigned int list);
248-
extern int devm_devfreq_register_notifier(struct device *dev,
231+
struct dev_pm_opp *devfreq_recommended_opp(struct device *dev,
232+
unsigned long *freq, u32 flags);
233+
int devfreq_register_opp_notifier(struct device *dev,
234+
struct devfreq *devfreq);
235+
int devfreq_unregister_opp_notifier(struct device *dev,
236+
struct devfreq *devfreq);
237+
int devm_devfreq_register_opp_notifier(struct device *dev,
238+
struct devfreq *devfreq);
239+
void devm_devfreq_unregister_opp_notifier(struct device *dev,
240+
struct devfreq *devfreq);
241+
int devfreq_register_notifier(struct devfreq *devfreq,
242+
struct notifier_block *nb,
243+
unsigned int list);
244+
int devfreq_unregister_notifier(struct devfreq *devfreq,
245+
struct notifier_block *nb,
246+
unsigned int list);
247+
int devm_devfreq_register_notifier(struct device *dev,
249248
struct devfreq *devfreq,
250249
struct notifier_block *nb,
251250
unsigned int list);
252-
extern void devm_devfreq_unregister_notifier(struct device *dev,
251+
void devm_devfreq_unregister_notifier(struct device *dev,
253252
struct devfreq *devfreq,
254253
struct notifier_block *nb,
255254
unsigned int list);
256-
extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
257-
int index);
255+
struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index);
258256

259257
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
260258
/**
@@ -311,9 +309,9 @@ struct devfreq_passive_data {
311309

312310
#else /* !CONFIG_PM_DEVFREQ */
313311
static inline struct devfreq *devfreq_add_device(struct device *dev,
314-
struct devfreq_dev_profile *profile,
315-
const char *governor_name,
316-
void *data)
312+
struct devfreq_dev_profile *profile,
313+
const char *governor_name,
314+
void *data)
317315
{
318316
return ERR_PTR(-ENOSYS);
319317
}
@@ -350,31 +348,31 @@ static inline void devfreq_suspend(void) {}
350348
static inline void devfreq_resume(void) {}
351349

352350
static inline struct dev_pm_opp *devfreq_recommended_opp(struct device *dev,
353-
unsigned long *freq, u32 flags)
351+
unsigned long *freq, u32 flags)
354352
{
355353
return ERR_PTR(-EINVAL);
356354
}
357355

358356
static inline int devfreq_register_opp_notifier(struct device *dev,
359-
struct devfreq *devfreq)
357+
struct devfreq *devfreq)
360358
{
361359
return -EINVAL;
362360
}
363361

364362
static inline int devfreq_unregister_opp_notifier(struct device *dev,
365-
struct devfreq *devfreq)
363+
struct devfreq *devfreq)
366364
{
367365
return -EINVAL;
368366
}
369367

370368
static inline int devm_devfreq_register_opp_notifier(struct device *dev,
371-
struct devfreq *devfreq)
369+
struct devfreq *devfreq)
372370
{
373371
return -EINVAL;
374372
}
375373

376374
static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
377-
struct devfreq *devfreq)
375+
struct devfreq *devfreq)
378376
{
379377
}
380378

@@ -393,22 +391,22 @@ static inline int devfreq_unregister_notifier(struct devfreq *devfreq,
393391
}
394392

395393
static inline int devm_devfreq_register_notifier(struct device *dev,
396-
struct devfreq *devfreq,
397-
struct notifier_block *nb,
398-
unsigned int list)
394+
struct devfreq *devfreq,
395+
struct notifier_block *nb,
396+
unsigned int list)
399397
{
400398
return 0;
401399
}
402400

403401
static inline void devm_devfreq_unregister_notifier(struct device *dev,
404-
struct devfreq *devfreq,
405-
struct notifier_block *nb,
406-
unsigned int list)
402+
struct devfreq *devfreq,
403+
struct notifier_block *nb,
404+
unsigned int list)
407405
{
408406
}
409407

410408
static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
411-
int index)
409+
int index)
412410
{
413411
return ERR_PTR(-ENODEV);
414412
}

0 commit comments

Comments
 (0)