From: Tian Tao <tiantao6@hisilicon.com>
To: <ulf.hansson@linaro.org>, <baolin.wang@linaro.org>,
<Jisheng.Zhang@synaptics.com>, <pali@kernel.org>,
<philipl@overt.org>, <linux-mmc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <linuxarm@huawei.com>
Subject: [PATCH] mmc: sd: Use kobj_to_dev() instead of container_of()
Date: Mon, 24 Aug 2020 09:02:36 +0800 [thread overview]
Message-ID: <1598230956-58523-1-git-send-email-tiantao6@hisilicon.com> (raw)
Use kobj_to_dev() instead of container_of()
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/mmc/core/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 5a2210c..a0d2c34 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -735,7 +735,7 @@ static struct attribute *sd_std_attrs[] = {
static umode_t sd_std_is_visible(struct kobject *kobj, struct attribute *attr,
int index)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct mmc_card *card = mmc_dev_to_card(dev);
/* CIS vendor and device ids are available only for Combo cards */
--
2.7.4
next reply other threads:[~2020-08-24 1:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 1:02 Tian Tao [this message]
2020-08-28 8:43 ` [PATCH] mmc: sd: Use kobj_to_dev() instead of container_of() Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1598230956-58523-1-git-send-email-tiantao6@hisilicon.com \
--to=tiantao6@hisilicon.com \
--cc=Jisheng.Zhang@synaptics.com \
--cc=baolin.wang@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=pali@kernel.org \
--cc=philipl@overt.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).