Commit e449d983 authored by Tian Tao's avatar Tian Tao Committed by Ulf Hansson

mmc: sd: Use kobj_to_dev() instead of container_of()

Use kobj_to_dev() instead of container_of()
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1598230956-58523-1-git-send-email-tiantao6@hisilicon.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 43611afb
...@@ -759,7 +759,7 @@ static struct attribute *sd_std_attrs[] = { ...@@ -759,7 +759,7 @@ static struct attribute *sd_std_attrs[] = {
static umode_t sd_std_is_visible(struct kobject *kobj, struct attribute *attr, static umode_t sd_std_is_visible(struct kobject *kobj, struct attribute *attr,
int index) 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); struct mmc_card *card = mmc_dev_to_card(dev);
/* CIS vendor and device ids, revision and info string are available only for Combo cards */ /* CIS vendor and device ids, revision and info string are available only for Combo cards */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment