]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/devfreq/governor.h
Merge tag 'fsnotify_for_v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-jammy-kernel.git] / drivers / devfreq / governor.h
index 70f44b3ca42e60c2aa5cc6b440ff38846c350cb9..2d69a0ce6291b75cacaa6be83f4aab75d8c64e4b 100644 (file)
@@ -57,8 +57,6 @@
  *                     Basically, get_target_freq will run
  *                     devfreq_dev_profile.get_dev_status() to get the
  *                     status of the device (load = busy_time / total_time).
- *                     If no_central_polling is set, this callback is called
- *                     only with update_devfreq() notified by OPP.
  * @event_handler:      Callback for devfreq core framework to notify events
  *                      to governors. Events include per device governor
  *                      init and exit, opp changes out of devfreq, suspend
@@ -91,6 +89,9 @@ int devfreq_update_target(struct devfreq *devfreq, unsigned long freq);
 
 static inline int devfreq_update_stats(struct devfreq *df)
 {
+       if (!df->profile->get_dev_status)
+               return -EINVAL;
+
        return df->profile->get_dev_status(df->dev.parent, &df->last_status);
 }
 #endif /* _GOVERNOR_H */