diff options
| -rw-r--r-- | drivers/devfreq/devfreq.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 4e86cc0106df..2e685164c549 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
| @@ -475,11 +475,15 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type, | |||
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | /** | 477 | /** |
| 478 | * _remove_devfreq() - Remove devfreq from the list and release its resources. | 478 | * devfreq_dev_release() - Callback for struct device to release the device. |
| 479 | * @devfreq: the devfreq struct | 479 | * @dev: the devfreq device |
| 480 | * | ||
| 481 | * Remove devfreq from the list and release its resources. | ||
| 480 | */ | 482 | */ |
| 481 | static void _remove_devfreq(struct devfreq *devfreq) | 483 | static void devfreq_dev_release(struct device *dev) |
| 482 | { | 484 | { |
| 485 | struct devfreq *devfreq = to_devfreq(dev); | ||
| 486 | |||
| 483 | mutex_lock(&devfreq_list_lock); | 487 | mutex_lock(&devfreq_list_lock); |
| 484 | if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) { | 488 | if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) { |
| 485 | mutex_unlock(&devfreq_list_lock); | 489 | mutex_unlock(&devfreq_list_lock); |
| @@ -501,19 +505,6 @@ static void _remove_devfreq(struct devfreq *devfreq) | |||
| 501 | } | 505 | } |
| 502 | 506 | ||
| 503 | /** | 507 | /** |
| 504 | * devfreq_dev_release() - Callback for struct device to release the device. | ||
| 505 | * @dev: the devfreq device | ||
| 506 | * | ||
| 507 | * This calls _remove_devfreq() if _remove_devfreq() is not called. | ||
| 508 | */ | ||
| 509 | static void devfreq_dev_release(struct device *dev) | ||
| 510 | { | ||
| 511 | struct devfreq *devfreq = to_devfreq(dev); | ||
| 512 | |||
| 513 | _remove_devfreq(devfreq); | ||
| 514 | } | ||
| 515 | |||
| 516 | /** | ||
| 517 | * devfreq_add_device() - Add devfreq feature to the device | 508 | * devfreq_add_device() - Add devfreq feature to the device |
| 518 | * @dev: the device to add devfreq feature. | 509 | * @dev: the device to add devfreq feature. |
| 519 | * @profile: device-specific profile to run devfreq. | 510 | * @profile: device-specific profile to run devfreq. |
