Commit 892fc4b5 authored by Luke D. Jones's avatar Luke D. Jones Committed by Hans de Goede

platform/x86: asus-wmi: adjust formatting of ppt-<name>() functions

Shift the call to dev_get_drvdata() up to top of the function block
in all of the ppt_<name>() functions as part of a minor cleanup.
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarLuke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20240404001652.86207-7-luke@ljones.devSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 5fc37818
......@@ -1008,11 +1008,10 @@ static ssize_t ppt_pl2_sppt_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......@@ -1052,11 +1051,10 @@ static ssize_t ppt_pl1_spl_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......@@ -1095,11 +1093,10 @@ static ssize_t ppt_fppt_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......@@ -1139,11 +1136,10 @@ static ssize_t ppt_apu_sppt_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......@@ -1183,11 +1179,10 @@ static ssize_t ppt_platform_sppt_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......@@ -1227,11 +1222,10 @@ static ssize_t nv_dynamic_boost_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......@@ -1271,11 +1265,10 @@ static ssize_t nv_temp_target_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
int result, err;
u32 value;
struct asus_wmi *asus = dev_get_drvdata(dev);
result = kstrtou32(buf, 10, &value);
if (result)
return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment