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: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20240404001652.86207-7-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Luke D. Jones 2024-04-04 13:16:49 +13:00 committed by Hans de Goede
parent 5fc378183d
commit 892fc4b57d

View File

@ -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;