projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43611af
)
mmc: sd: Use kobj_to_dev() instead of container_of()
author
Tian Tao
<tiantao6@hisilicon.com>
Mon, 24 Aug 2020 01:02:36 +0000
(09:02 +0800)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Mon, 7 Sep 2020 07:11:30 +0000
(09:11 +0200)
Use kobj_to_dev() instead of container_of()
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link:
https://lore.kernel.org/r/1598230956-58523-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sd.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/sd.c
b/drivers/mmc/core/sd.c
index
429ca14
..
6f054c4
100644
(file)
--- a/
drivers/mmc/core/sd.c
+++ b/
drivers/mmc/core/sd.c
@@
-759,7
+759,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, revision and info string are available only for Combo cards */