Revert "PM/devfreq: governor: Add a private governor_data for governor"
This reverts commitb9275d8a92
which is commit 5fdded8448924e3631d466eea499b11606c43640 upstream. It breaks the Android kernel api and is not needed for Android systems as they do not support this type of functionality. If it is needed to be brought back in the future, it can be done so in a way that does not break the ABI. Bug: 161946584 Fixes:b9275d8a92
("PM/devfreq: governor: Add a private governor_data for governor") Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I0107d52a8f445548f7de462315dbe99ec4ab3d98
This commit is contained in:
parent
68fdd20442
commit
b1330360db
@ -603,7 +603,8 @@ static void devfreq_dev_release(struct device *dev)
|
||||
* @dev: the device to add devfreq feature.
|
||||
* @profile: device-specific profile to run devfreq.
|
||||
* @governor_name: name of the policy to choose frequency.
|
||||
* @data: devfreq driver pass to governors, governor should not change it.
|
||||
* @data: private data for the governor. The devfreq framework does not
|
||||
* touch this value.
|
||||
*/
|
||||
struct devfreq *devfreq_add_device(struct device *dev,
|
||||
struct devfreq_dev_profile *profile,
|
||||
@ -787,7 +788,8 @@ static void devm_devfreq_dev_release(struct device *dev, void *res)
|
||||
* @dev: the device to add devfreq feature.
|
||||
* @profile: device-specific profile to run devfreq.
|
||||
* @governor_name: name of the policy to choose frequency.
|
||||
* @data: devfreq driver pass to governors, governor should not change it.
|
||||
* @data: private data for the governor. The devfreq framework does not
|
||||
* touch this value.
|
||||
*
|
||||
* This function manages automatically the memory of devfreq device using device
|
||||
* resource management and simplify the free operation for memory of devfreq
|
||||
|
@ -21,7 +21,7 @@ struct userspace_data {
|
||||
|
||||
static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq)
|
||||
{
|
||||
struct userspace_data *data = df->governor_data;
|
||||
struct userspace_data *data = df->data;
|
||||
|
||||
if (data->valid)
|
||||
*freq = data->user_frequency;
|
||||
@ -40,7 +40,7 @@ static ssize_t store_freq(struct device *dev, struct device_attribute *attr,
|
||||
int err = 0;
|
||||
|
||||
mutex_lock(&devfreq->lock);
|
||||
data = devfreq->governor_data;
|
||||
data = devfreq->data;
|
||||
|
||||
sscanf(buf, "%lu", &wanted);
|
||||
data->user_frequency = wanted;
|
||||
@ -60,7 +60,7 @@ static ssize_t show_freq(struct device *dev, struct device_attribute *attr,
|
||||
int err = 0;
|
||||
|
||||
mutex_lock(&devfreq->lock);
|
||||
data = devfreq->governor_data;
|
||||
data = devfreq->data;
|
||||
|
||||
if (data->valid)
|
||||
err = sprintf(buf, "%lu\n", data->user_frequency);
|
||||
@ -91,7 +91,7 @@ static int userspace_init(struct devfreq *devfreq)
|
||||
goto out;
|
||||
}
|
||||
data->valid = false;
|
||||
devfreq->governor_data = data;
|
||||
devfreq->data = data;
|
||||
|
||||
err = sysfs_create_group(&devfreq->dev.kobj, &dev_attr_group);
|
||||
out:
|
||||
@ -107,8 +107,8 @@ static void userspace_exit(struct devfreq *devfreq)
|
||||
if (devfreq->dev.kobj.sd)
|
||||
sysfs_remove_group(&devfreq->dev.kobj, &dev_attr_group);
|
||||
|
||||
kfree(devfreq->governor_data);
|
||||
devfreq->governor_data = NULL;
|
||||
kfree(devfreq->data);
|
||||
devfreq->data = NULL;
|
||||
}
|
||||
|
||||
static int devfreq_userspace_handler(struct devfreq *devfreq,
|
||||
|
@ -121,10 +121,10 @@ struct devfreq_dev_profile {
|
||||
* devfreq.nb to the corresponding register notifier call chain.
|
||||
* @work: delayed work for load monitoring.
|
||||
* @previous_freq: previously configured frequency value.
|
||||
* @data: devfreq driver pass to governors, governor should not change it.
|
||||
* @governor_data: private data for governors, devfreq core doesn't touch it.
|
||||
* @min_freq: Limit minimum frequency requested by user (0: none)
|
||||
* @max_freq: Limit maximum frequency requested by user (0: none)
|
||||
* @data: Private data of the governor. The devfreq framework does not
|
||||
* touch this.
|
||||
* @min_freq: Limit minimum frequency requested by user (0: none)
|
||||
* @max_freq: Limit maximum frequency requested by user (0: none)
|
||||
* @scaling_min_freq: Limit minimum frequency requested by OPP interface
|
||||
* @scaling_max_freq: Limit maximum frequency requested by OPP interface
|
||||
* @stop_polling: devfreq polling status of a device.
|
||||
@ -159,8 +159,7 @@ struct devfreq {
|
||||
unsigned long previous_freq;
|
||||
struct devfreq_dev_status last_status;
|
||||
|
||||
void *data;
|
||||
void *governor_data;
|
||||
void *data; /* private data for governors */
|
||||
|
||||
unsigned long min_freq;
|
||||
unsigned long max_freq;
|
||||
|
Loading…
Reference in New Issue
Block a user