};
struct pass_resource_tmu_ops {
- /* Get the current temperature of resoruce. */
- int (*get_temp)(char *res_thremal_name);
+ /* Get the current temperature of resource. */
+ int (*get_temp)(char *res_thermal_name);
/* Get the policy of thermal management unit. */
int (*get_policy)(char *res_thermal_name, char *policy);
int (*uevent_handler)(struct resmon *monitor, void *result,
struct udev_device *dev);
/**
- * Intance of uevent subsystem. It will be used for only uevent-based
+ * Instance of uevent subsystem. It will be used for only uevent-based
* resource monitor.
*/
const char *uevent_subsystem;
/**
- * Intance of uevent device type. It will be used for only uevent-based
+ * Instance of uevent device type. It will be used for only uevent-based
* resource monitor.
*/
const char *uevent_devtype;
* File descriptor for udev device. It will be only used for
* uevent-based resource monitor.
*/
- guint udev_moniotr_fd;
+ guint udev_monitor_fd;
};
#endif /* __PASS_RESMON_INTERNAL__ */
monitor->user_func = user_func;
monitor->user_data = user_data;
- /* Get instance of struct resmon_ops accoring to resmon_src_type */
+ /* Get instance of struct resmon_ops according to resmon_src_type */
monitor->ops = resmon_get_ops(src_type);
if (!monitor->ops) {
ret = -EINVAL;
}
/*
- * At least, either uevent_subsystem or uevet_devtype should be not NULL
+ * At least, either uevent_subsystem or uevent_devtype should be not NULL
*/
if (!monitor->ops->uevent_subsystem && !monitor->ops->uevent_devtype) {
_E("failed to add filter due to subsystem/devtype are NULL " \
/* Bind udev-monitor to enable the udev monitoring */
ret = udev_monitor_enable_receiving(udev_monitor);
if (ret < 0) {
- _E("failed to bind udev monitor for receving the event " \
+ _E("failed to bind udev monitor for receiving the event " \
"(res_name:%s, src_type: 0x%x)\n",
res->config_data.res_name, monitor->src_type);
ret = -EAGAIN;
resmon->uevent_state |= monitor->src_type;
monitor->udev_monitor = udev_monitor;;
- monitor->udev_moniotr_fd = gfd;
+ monitor->udev_monitor_fd = gfd;
return 0;
}
udev_monitor_unref(monitor->udev_monitor);
- g_source_remove(monitor->udev_moniotr_fd);
+ g_source_remove(monitor->udev_monitor_fd);
monitor->udev_monitor = NULL;
- monitor->udev_moniotr_fd = -1;
+ monitor->udev_monitor_fd = -1;
/* Delete the uevent-based resmon from uevent_list */
resmon->uevent_state &= ~(monitor->src_type);
monitor->user_func = user_func;
monitor->user_data = user_data;
- /* Get instance of struct resmon_ops accoring to resmon_src_type */
+ /* Get instance of struct resmon_ops according to resmon_src_type */
monitor->ops = resmon_get_ops(src_type);
if (!monitor->ops) {
_E("failed to get resmon_ops (res_name: %s, type: 0x%x)\n",
*/
unsigned int *load;
- unsigned int *nr_running; /** Unused paramerter will be removed */
- unsigned int *runnable_load; /** Unused paramerter will be removed */
+ unsigned int *nr_running; /** Unused parameter will be removed */
+ unsigned int *runnable_load; /** Unused parameter will be removed */
- unsigned int num_busy_cpu; /** Unused paramerter will be removed */
- unsigned int avg_load; /** Unused paramerter will be removed */
- unsigned int avg_runnable_load; /** Unused paramerter will be removed */
- unsigned int avg_thread_load; /** Unused paramerter will be removed */
- /** Unused paramerter will be removed */
+ unsigned int num_busy_cpu; /** Unused parameter will be removed */
+ unsigned int avg_load; /** Unused parameter will be removed */
+ unsigned int avg_runnable_load; /** Unused parameter will be removed */
+ unsigned int avg_thread_load; /** Unused parameter will be removed */
+ /** Unused parameter will be removed */
unsigned int avg_thread_runnable_load;
};
/*
* If temperature is lower than defined temperature in configuration
- * or if there are no scearnio with 'support=yes',
+ * or if there are no scenario with 'support=yes',
* just return without notification.
*/
if (scenario_idx < 0)
return -1;
}
- /* Check whether PASS is initialzied state or not */
+ /* Check whether PASS is initialized state or not */
if (res->state) {
_I("PASS is already active state");
return -1;
struct {
/** Locked state of scenario (either locked or unlocked) */
enum pass_state locked;
- /** Requiired locking time of scenario */
+ /** Required locking time of scenario */
int64_t locked_time;
/** Required minimum pass_level */
unsigned int min_level;
unsigned int curr_level;
/** Available minimum level according to locked scenarios */
unsigned int min_level;
- /** Availabl maximum level according to locked scenarios */
+ /** Available maximum level according to locked scenarios */
unsigned int max_level;
};
******************************************************/
/**
- * @brief Represent PASS(Power Aware System Serice).
+ * @brief Represent PASS(Power Aware System Service).
*/
struct pass {
/** State of PASS daemon */
scenarios->list = calloc(num,
sizeof(struct scenario));
if (!scenarios->list) {
- _E("failed to allocat memory for scenario");
+ _E("failed to allocate memory for scenario");
return -errno;
}
}
if (ret < 0) {
- _E("cannot set the PMQoS sceanrio: "
+ _E("cannot set the PMQoS scenario: "
"%s is not supported\n", name_from);
ret_out = FALSE;
goto out_dbus;
_I("Support \'%s\' scenario", g_pmqos->list[i].name);
/*
- * Set maximum timeout for the sceanrio by using the parsed data from
+ * Set maximum timeout for the scenario by using the parsed data from
* pass-pmqos.conf. But, if there is no setting from pass-pmqos.conf
* pmqos uses the default timeout value (3000 millisecond).
*/
ASSERT_EQ(ret, 0) << "PassServiceStart Failed";
ret = system("/bin/systemctl stop pass.service");
- ASSERT_EQ(ret, 0) << "PassServieStop Failed";
+ ASSERT_EQ(ret, 0) << "PassServiceStop Failed";
ret = system("/bin/systemctl start pass.service");
ASSERT_EQ(ret, 0) << "PassServiceStart Failed";
/*
* If -EPERM, function is not supported according to h/w resource type.
* And if -ENODEV, function is not implemented on hal package.
- * It means that this funcion is not necessary on two error case
+ * It means that this function is not necessary on two error case
* when calling the HAL functions.
*/
if (ret < 0) {
/* Stop PASS daemon before HAL testing */
ret = system("/bin/systemctl stop pass.service");
- ASSERT_EQ(ret, 0) << "PassServieStop Faield";
+ ASSERT_EQ(ret, 0) << "PassServiceStop Failed";
ret = pass_get_resource_config(&g_pass, path);
ASSERT_EQ(ret, 0) << "GetResourceConfig Failed";
/* Restart PASS daemon before HAL testing */
ret = system("/bin/systemctl start pass.service");
- ASSERT_EQ(ret, 0) << "PassServiceStart Faield";
+ ASSERT_EQ(ret, 0) << "PassServiceStart Failed";
}
int main(int argc, char *argv[])