platform/x86: Switch to using the new API kobj_to_dev()
PATCH 1/1 platform/x86: Switch to using the new API kobj_to_dev()
fixed the following coccicheck:
./drivers/platform/x86/ideapad-laptop.c:523:60-61: WARNING opportunity for kobj_to_dev()
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- drivers/platform/x86/ideapad-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/ideapad-laptop.c +1 -1
@@ -520,7 +520,7 @@ static umode_t ideapad_is_visible(struct kobject *kobj, struct attribute *attr, int idx) { - struct device *dev = container_of(kobj, struct device, kobj); +struct device *dev =kobj_to_dev (kobj);struct ideapad_private *priv =dev_get_drvdata (dev);bool supported;
Signature · 1 line
1.8.3.1
Hi,
Quoted 6 lines · Yang Li
fixed the following coccicheck:
./drivers/platform/x86/ideapad-laptop.c:523:60-61: WARNING opportunity forkobj_to_dev()Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
Patch does not apply, please resend it rebased on the latest pdx86/for-next branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=for-next
Regards,
Hans
Quoted 18 lines
--- drivers/platform/x86/ideapad-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/x86/ideapad-laptop.c +1
-1@@ -520,7 +520,7 @@ static umode_t ideapad_is_visible(struct kobject *kobj, struct attribute *attr, int idx) { - struct device *dev = container_of(kobj, struct device, kobj); +struct device *dev =kobj_to_dev (kobj);struct ideapad_private *priv =dev_get_drvdata (dev);bool supported;