Fixes: ae834a549ec1 ("platform/x86: asus-wmi: add support variant of TUF RGB")
Luke D. Jones
maintainerPATCH 1/1 Fixes: ae834a549ec1 ("platform/x86: asus-wmi: add support variant of TUF RGB")
In kbd_rgb_mode_store the dev_get_drvdata() call was assuming the device data was asus_wmi when it was actually led_classdev.
This patch corrects this by making the correct chain of calls to get the asus_wmi driver data.
--- drivers/platform/x86/asus-wmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/x86/asus-wmi.c +5 -1
@@ -879,10 +879,14 @@ static ssize_t kbd_rgb_mode_store(struct device *dev,struct device_attribute *attr, const char *buf, size_t count) { - struct asus_wmi *asus = dev_get_drvdata(dev); u32 cmd, mode, r, g, b, speed; +struct led_classdev *led; +struct asus_wmi *asus;int err; + led =dev_get_drvdata (dev); + asus = container_of(led, struct asus_wmi, kbd_led); +if (sscanf (buf,"%d %d %d %d %d %d" , &cmd, &mode, &r, &g, &b, &speed) !=6 )return -EINVAL ;
Signature · 1 line
2.45.2
Ilpo Järvinen
maintainerQuoted 8 lines · Luke D. Jones
In
kbd_rgb_mode_storethedev_get_drvdata()call was assuming the device data wasasus_wmiwhen it was actuallyled_classdev.This patch corrects this by making the correct chain of calls to get the
asus_wmidriver data.Tested-by Denis Benato <[email protected]>Signed-off-by Luke D. Jones <[email protected]>
Your tags seem messed up, Fixes is in Subject in place of shortlog that is completely missing.
Could you please correct these issues and resubmit, thank you.
Signature · 1 line
i.
Quoted 25 lines
--- drivers/platform/x86/asus-wmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/platform/x86/asus-wmi.c +5
-1@@ -879,10 +879,14 @@ static ssize_t kbd_rgb_mode_store(struct device *dev,struct device_attribute *attr, const char *buf, size_t count) { - struct asus_wmi *asus = dev_get_drvdata(dev); u32 cmd, mode, r, g, b, speed; +struct led_classdev *led; +struct asus_wmi *asus;int err; + led =dev_get_drvdata (dev); + asus = container_of(led, struct asus_wmi, kbd_led); +if (sscanf (buf,"%d %d %d %d %d %d" , &cmd, &mode, &r, &g, &b, &speed) !=6 )return -EINVAL ;
Luke Jones
maintainerQuoted 8 lines · Ilpo Järvinen
Quoted 6 lines · Luke D. Jones
In
kbd_rgb_mode_storethedev_get_drvdata()call was assuming the device data wasasus_wmiwhen it was actuallyled_classdev.This patch corrects this by making the correct chain of calls to get the
asus_wmidriver data.
Quoted 7 lines
Quoted 2 lines
Tested-by Denis Benato <[email protected]>Signed-off-by Luke D. Jones <[email protected]>Your tags seem messed up, Fixes is in Subject in place of shortlog that is completely missing.
Could you please correct these issues and resubmit, thank you.
Looks like I misunderstood something somewhere. Will resubmit.
Quoted 30 lines
Signature · 2 lines
-- i.Quoted 25 lines
--- drivers/platform/x86/asus-wmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/platform/x86/asus-wmi.c +5
-1@@ -879,10 +879,14 @@ static ssize_t kbd_rgb_mode_store(struct device *dev,struct device_attribute *attr, const char *buf, size_t count) { - struct asus_wmi *asus = dev_get_drvdata(dev); u32 cmd, mode, r, g, b, speed; +struct led_classdev *led; +struct asus_wmi *asus;int err; + led =dev_get_drvdata (dev); + asus = container_of(led, struct asus_wmi, kbd_led); +if (sscanf (buf,"%d %d %d %d %d %d" , &cmd, &mode, &r, &g, &b, &speed) !=6 )return -EINVAL ;