[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1613977238-104556-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Mon, 22 Feb 2021 15:00:38 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: ike.pan@...onical.com
Cc: hdegoede@...hat.com, mgross@...ux.intel.com,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] 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 <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
drivers/platform/x86/ideapad-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 5b81baf..d6ca4f0 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -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;
--
1.8.3.1
Powered by blists - more mailing lists