mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
platform/x86/amd/pmf: Use str_on_off() helper
We have a common helper to represent a boolean value as "on"/"off" string. Use it for the sake of the unified style. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/r/20230811131330.71263-1-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
committed by
Hans de Goede
parent
4316c64085
commit
cd99ebe5b3
@@ -8,6 +8,7 @@
|
||||
* Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
|
||||
*/
|
||||
|
||||
#include <linux/string_choices.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include "pmf.h"
|
||||
|
||||
@@ -399,7 +400,7 @@ static ssize_t cnqf_enable_store(struct device *dev,
|
||||
amd_pmf_set_sps_power_limits(pdev);
|
||||
}
|
||||
|
||||
dev_dbg(pdev->dev, "Received CnQF %s\n", input ? "on" : "off");
|
||||
dev_dbg(pdev->dev, "Received CnQF %s\n", str_on_off(input));
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -409,7 +410,7 @@ static ssize_t cnqf_enable_show(struct device *dev,
|
||||
{
|
||||
struct amd_pmf_dev *pdev = dev_get_drvdata(dev);
|
||||
|
||||
return sysfs_emit(buf, "%s\n", pdev->cnqf_enabled ? "on" : "off");
|
||||
return sysfs_emit(buf, "%s\n", str_on_off(pdev->cnqf_enabled));
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_RW(cnqf_enable);
|
||||
|
||||
Reference in New Issue
Block a user